1 // Copyright 2012 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef NET_URL_REQUEST_URL_REQUEST_NETLOG_PARAMS_H_ 6 #define NET_URL_REQUEST_URL_REQUEST_NETLOG_PARAMS_H_ 7 8 #include <stdint.h> 9 10 #include <memory> 11 #include <optional> 12 #include <string> 13 14 #include "base/values.h" 15 #include "net/base/isolation_info.h" 16 #include "net/base/net_export.h" 17 #include "net/base/privacy_mode.h" 18 #include "net/base/request_priority.h" 19 #include "net/log/net_log_capture_mode.h" 20 #include "net/traffic_annotation/network_traffic_annotation.h" 21 22 class GURL; 23 24 namespace url { 25 class Origin; 26 } 27 28 namespace net { 29 30 class SiteForCookies; 31 32 // Returns a Value containing NetLog parameters for constructing a URLRequest. 33 NET_EXPORT base::Value::Dict NetLogURLRequestConstructorParams( 34 const GURL& url, 35 RequestPriority priority, 36 NetworkTrafficAnnotationTag traffic_annotation); 37 38 // Returns a Value containing NetLog parameters for starting a URLRequest. 39 NET_EXPORT base::Value::Dict NetLogURLRequestStartParams( 40 const GURL& url, 41 const std::string& method, 42 int load_flags, 43 const IsolationInfo& isolation_info, 44 const SiteForCookies& site_for_cookies, 45 const std::optional<url::Origin>& initiator, 46 int64_t upload_id); 47 48 } // namespace net 49 50 #endif // NET_URL_REQUEST_URL_REQUEST_NETLOG_PARAMS_H_ 51