Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 |
| 66 std::unique_ptr<URLRequest> CreateRequest( | 67 std::unique_ptr<URLRequest> CreateRequest( |
|
battre
2016/10/17 14:58:46
Add
// DEPRECATED. Please use the version with Net
Ramin Halavati
2016/10/18 06:57:56
Done.
| |
| 67 const GURL& url, | 68 const GURL& url, |
| 68 RequestPriority priority, | 69 RequestPriority priority, |
| 69 URLRequest::Delegate* delegate) const; | 70 URLRequest::Delegate* delegate) const; |
| 70 | 71 |
| 71 NetLog* net_log() const { | 72 // This function is a proposed replacement for CreateRequest with mandatory |
| 72 return net_log_; | 73 // traffic annotation parameter. |
|
battre
2016/10/17 14:58:46
Delete this comment.
Ramin Halavati
2016/10/18 06:57:56
Done.
| |
| 73 } | 74 std::unique_ptr<URLRequest> CreateRequest( |
| 75 const GURL& url, | |
| 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 Loading... | |
| 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_ |
| OLD | NEW |