Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(485)

Side by Side Diff: net/url_request/url_request_context.h

Issue 2421333002: Protobuf for Traffic Annotation and first use by a URLFetcher. (Closed)
Patch Set: Traffic annotation sourceset added to net/BUILD.gn Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This class represents contextual information (cookies, cache, etc.) 5 // This class represents contextual information (cookies, cache, etc.)
6 // that's necessary when processing resource requests. 6 // that's necessary when processing resource requests.
7 7
8 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ 8 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_
9 #define NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ 9 #define NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_
10 10
11 #include <memory> 11 #include <memory>
12 #include <set> 12 #include <set>
13 #include <string> 13 #include <string>
14 14
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
17 #include "base/memory/weak_ptr.h" 17 #include "base/memory/weak_ptr.h"
18 #include "base/threading/non_thread_safe.h" 18 #include "base/threading/non_thread_safe.h"
19 #include "net/base/net_export.h" 19 #include "net/base/net_export.h"
20 #include "net/base/request_priority.h" 20 #include "net/base/request_priority.h"
21 #include "net/http/http_network_session.h" 21 #include "net/http/http_network_session.h"
22 #include "net/http/http_server_properties.h" 22 #include "net/http/http_server_properties.h"
23 #include "net/http/transport_security_state.h" 23 #include "net/http/transport_security_state.h"
24 #include "net/ssl/ssl_config_service.h" 24 #include "net/ssl/ssl_config_service.h"
25 #include "net/traffic_annotation/network_traffic_annotation.h"
25 #include "net/url_request/url_request.h" 26 #include "net/url_request/url_request.h"
26 27
27 namespace net { 28 namespace net {
28 class CertVerifier; 29 class CertVerifier;
29 class ChannelIDService; 30 class ChannelIDService;
30 class CookieStore; 31 class CookieStore;
31 class CTPolicyEnforcer; 32 class CTPolicyEnforcer;
32 class CTVerifier; 33 class CTVerifier;
33 class HostResolver; 34 class HostResolver;
34 class HttpAuthHandlerFactory; 35 class HttpAuthHandlerFactory;
(...skipping 21 matching lines...) Expand all
56 URLRequestContext(); 57 URLRequestContext();
57 virtual ~URLRequestContext(); 58 virtual ~URLRequestContext();
58 59
59 // Copies the state from |other| into this context. 60 // Copies the state from |other| into this context.
60 void CopyFrom(const URLRequestContext* other); 61 void CopyFrom(const URLRequestContext* other);
61 62
62 // May return nullptr if this context doesn't have an associated network 63 // May return nullptr if this context doesn't have an associated network
63 // session. 64 // session.
64 const HttpNetworkSession::Params* GetNetworkSessionParams() const; 65 const HttpNetworkSession::Params* GetNetworkSessionParams() const;
65 66
67 // DEPRECATED. Please use the version with NetworkTrafficAnnotationTag in the
68 // future.
66 std::unique_ptr<URLRequest> CreateRequest( 69 std::unique_ptr<URLRequest> CreateRequest(
67 const GURL& url, 70 const GURL& url,
68 RequestPriority priority, 71 RequestPriority priority,
69 URLRequest::Delegate* delegate) const; 72 URLRequest::Delegate* delegate) const;
70 73
71 NetLog* net_log() const { 74 std::unique_ptr<URLRequest> CreateRequest(
72 return net_log_; 75 const GURL& url,
73 } 76 RequestPriority priority,
77 URLRequest::Delegate* delegate,
78 NetworkTrafficAnnotationTag traffic_classification) const;
79
80 NetLog* net_log() const { return net_log_; }
74 81
75 void set_net_log(NetLog* net_log) { 82 void set_net_log(NetLog* net_log) {
76 net_log_ = net_log; 83 net_log_ = net_log;
77 } 84 }
78 85
79 HostResolver* host_resolver() const { 86 HostResolver* host_resolver() const {
80 return host_resolver_; 87 return host_resolver_;
81 } 88 }
82 89
83 void set_host_resolver(HostResolver* host_resolver) { 90 void set_host_resolver(HostResolver* host_resolver) {
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 275
269 // Enables Brotli Content-Encoding support. 276 // Enables Brotli Content-Encoding support.
270 bool enable_brotli_; 277 bool enable_brotli_;
271 278
272 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); 279 DISALLOW_COPY_AND_ASSIGN(URLRequestContext);
273 }; 280 };
274 281
275 } // namespace net 282 } // namespace net
276 283
277 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ 284 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698