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 useful when processing resource requests. | 6 // that's useful when processing resource requests. |
7 // The class is reference-counted so that it can be cleaned up after any | 7 // The class is reference-counted so that it can be cleaned up after any |
8 // requests that are using it have been completed. | 8 // requests that are using it have been completed. |
9 | 9 |
10 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 10 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "net/http/transport_security_state.h" | 24 #include "net/http/transport_security_state.h" |
25 #include "net/log/net_log.h" | 25 #include "net/log/net_log.h" |
26 #include "net/ssl/ssl_config_service.h" | 26 #include "net/ssl/ssl_config_service.h" |
27 #include "net/url_request/url_request.h" | 27 #include "net/url_request/url_request.h" |
28 | 28 |
29 namespace net { | 29 namespace net { |
30 class CertVerifier; | 30 class CertVerifier; |
31 class ChannelIDService; | 31 class ChannelIDService; |
32 class CookieStore; | 32 class CookieStore; |
33 class CTVerifier; | 33 class CTVerifier; |
34 class FraudulentCertificateReporter; | |
35 class HostResolver; | 34 class HostResolver; |
36 class HttpAuthHandlerFactory; | 35 class HttpAuthHandlerFactory; |
37 class HttpTransactionFactory; | 36 class HttpTransactionFactory; |
38 class HttpUserAgentSettings; | 37 class HttpUserAgentSettings; |
39 class NetworkDelegate; | 38 class NetworkDelegate; |
40 class NetworkQualityEstimator; | 39 class NetworkQualityEstimator; |
41 class SdchManager; | 40 class SdchManager; |
42 class ProxyService; | 41 class ProxyService; |
43 class URLRequest; | 42 class URLRequest; |
44 class URLRequestBackoffManager; | 43 class URLRequestBackoffManager; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 | 91 |
93 ChannelIDService* channel_id_service() const { | 92 ChannelIDService* channel_id_service() const { |
94 return channel_id_service_; | 93 return channel_id_service_; |
95 } | 94 } |
96 | 95 |
97 void set_channel_id_service( | 96 void set_channel_id_service( |
98 ChannelIDService* channel_id_service) { | 97 ChannelIDService* channel_id_service) { |
99 channel_id_service_ = channel_id_service; | 98 channel_id_service_ = channel_id_service; |
100 } | 99 } |
101 | 100 |
102 FraudulentCertificateReporter* fraudulent_certificate_reporter() const { | |
103 return fraudulent_certificate_reporter_; | |
104 } | |
105 void set_fraudulent_certificate_reporter( | |
106 FraudulentCertificateReporter* fraudulent_certificate_reporter) { | |
107 fraudulent_certificate_reporter_ = fraudulent_certificate_reporter; | |
108 } | |
109 | |
110 // Get the proxy service for this context. | 101 // Get the proxy service for this context. |
111 ProxyService* proxy_service() const { return proxy_service_; } | 102 ProxyService* proxy_service() const { return proxy_service_; } |
112 void set_proxy_service(ProxyService* proxy_service) { | 103 void set_proxy_service(ProxyService* proxy_service) { |
113 proxy_service_ = proxy_service; | 104 proxy_service_ = proxy_service; |
114 } | 105 } |
115 | 106 |
116 // Get the ssl config service for this context. | 107 // Get the ssl config service for this context. |
117 SSLConfigService* ssl_config_service() const { | 108 SSLConfigService* ssl_config_service() const { |
118 return ssl_config_service_.get(); | 109 return ssl_config_service_.get(); |
119 } | 110 } |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 // Important: When adding any new members below, consider whether they need to | 223 // Important: When adding any new members below, consider whether they need to |
233 // be added to CopyFrom. | 224 // be added to CopyFrom. |
234 // --------------------------------------------------------------------------- | 225 // --------------------------------------------------------------------------- |
235 | 226 |
236 // Ownership for these members are not defined here. Clients should either | 227 // Ownership for these members are not defined here. Clients should either |
237 // provide storage elsewhere or have a subclass take ownership. | 228 // provide storage elsewhere or have a subclass take ownership. |
238 NetLog* net_log_; | 229 NetLog* net_log_; |
239 HostResolver* host_resolver_; | 230 HostResolver* host_resolver_; |
240 CertVerifier* cert_verifier_; | 231 CertVerifier* cert_verifier_; |
241 ChannelIDService* channel_id_service_; | 232 ChannelIDService* channel_id_service_; |
242 FraudulentCertificateReporter* fraudulent_certificate_reporter_; | |
243 HttpAuthHandlerFactory* http_auth_handler_factory_; | 233 HttpAuthHandlerFactory* http_auth_handler_factory_; |
244 ProxyService* proxy_service_; | 234 ProxyService* proxy_service_; |
245 scoped_refptr<SSLConfigService> ssl_config_service_; | 235 scoped_refptr<SSLConfigService> ssl_config_service_; |
246 NetworkDelegate* network_delegate_; | 236 NetworkDelegate* network_delegate_; |
247 base::WeakPtr<HttpServerProperties> http_server_properties_; | 237 base::WeakPtr<HttpServerProperties> http_server_properties_; |
248 HttpUserAgentSettings* http_user_agent_settings_; | 238 HttpUserAgentSettings* http_user_agent_settings_; |
249 scoped_refptr<CookieStore> cookie_store_; | 239 scoped_refptr<CookieStore> cookie_store_; |
250 TransportSecurityState* transport_security_state_; | 240 TransportSecurityState* transport_security_state_; |
251 CTVerifier* cert_transparency_verifier_; | 241 CTVerifier* cert_transparency_verifier_; |
252 HttpTransactionFactory* http_transaction_factory_; | 242 HttpTransactionFactory* http_transaction_factory_; |
253 const URLRequestJobFactory* job_factory_; | 243 const URLRequestJobFactory* job_factory_; |
254 URLRequestThrottlerManager* throttler_manager_; | 244 URLRequestThrottlerManager* throttler_manager_; |
255 URLRequestBackoffManager* backoff_manager_; | 245 URLRequestBackoffManager* backoff_manager_; |
256 SdchManager* sdch_manager_; | 246 SdchManager* sdch_manager_; |
257 NetworkQualityEstimator* network_quality_estimator_; | 247 NetworkQualityEstimator* network_quality_estimator_; |
258 | 248 |
259 // --------------------------------------------------------------------------- | 249 // --------------------------------------------------------------------------- |
260 // Important: When adding any new members below, consider whether they need to | 250 // Important: When adding any new members below, consider whether they need to |
261 // be added to CopyFrom. | 251 // be added to CopyFrom. |
262 // --------------------------------------------------------------------------- | 252 // --------------------------------------------------------------------------- |
263 | 253 |
264 scoped_ptr<std::set<const URLRequest*> > url_requests_; | 254 scoped_ptr<std::set<const URLRequest*> > url_requests_; |
265 | 255 |
266 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); | 256 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); |
267 }; | 257 }; |
268 | 258 |
269 } // namespace net | 259 } // namespace net |
270 | 260 |
271 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 261 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
OLD | NEW |