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 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_ |
| 11 #define NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 11 #define NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
| 12 | 12 |
| 13 #include <set> | 13 #include <set> |
| 14 #include <string> | 14 #include <string> |
| 15 | 15 |
| 16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
| 17 #include "base/memory/scoped_ptr.h" | 17 #include "base/memory/scoped_ptr.h" |
| 18 #include "base/memory/weak_ptr.h" | 18 #include "base/memory/weak_ptr.h" |
| 19 #include "base/threading/non_thread_safe.h" | 19 #include "base/threading/non_thread_safe.h" |
| 20 #include "net/base/net_export.h" | 20 #include "net/base/net_export.h" |
| 21 #include "net/base/net_log.h" | 21 #include "net/base/net_log.h" |
| 22 #include "net/base/request_priority.h" | 22 #include "net/base/request_priority.h" |
| 23 #include "net/http/http_network_session.h" | 23 #include "net/http/http_network_session.h" |
| 24 #include "net/http/http_server_properties.h" | 24 #include "net/http/http_server_properties.h" |
| 25 #include "net/http/transport_security_state.h" | 25 #include "net/http/transport_security_state.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 CertPolicyEnforcer; | |
| 30 class CertVerifier; | 31 class CertVerifier; |
| 31 class ChannelIDService; | 32 class ChannelIDService; |
| 32 class CookieStore; | 33 class CookieStore; |
| 33 class CTVerifier; | 34 class CTVerifier; |
| 34 class FraudulentCertificateReporter; | 35 class FraudulentCertificateReporter; |
| 35 class HostResolver; | 36 class HostResolver; |
| 36 class HttpAuthHandlerFactory; | 37 class HttpAuthHandlerFactory; |
| 37 class HttpTransactionFactory; | 38 class HttpTransactionFactory; |
| 38 class HttpUserAgentSettings; | 39 class HttpUserAgentSettings; |
| 39 class NetworkDelegate; | 40 class NetworkDelegate; |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 164 transport_security_state_ = state; | 165 transport_security_state_ = state; |
| 165 } | 166 } |
| 166 | 167 |
| 167 CTVerifier* cert_transparency_verifier() const { | 168 CTVerifier* cert_transparency_verifier() const { |
| 168 return cert_transparency_verifier_; | 169 return cert_transparency_verifier_; |
| 169 } | 170 } |
| 170 void set_cert_transparency_verifier(CTVerifier* verifier) { | 171 void set_cert_transparency_verifier(CTVerifier* verifier) { |
| 171 cert_transparency_verifier_ = verifier; | 172 cert_transparency_verifier_ = verifier; |
| 172 } | 173 } |
| 173 | 174 |
| 175 CertPolicyEnforcer* cert_policy_enforcer() const { | |
| 176 return cert_policy_enforcer_; | |
| 177 } | |
| 178 void set_cert_policy_enforcer(CertPolicyEnforcer* policy_enforcer) { | |
| 179 cert_policy_enforcer_ = policy_enforcer; | |
| 180 } | |
|
mmenke
2014/11/05 19:32:36
Does this need to be part of the context?
You're
Eran Messeri
2014/11/19 10:00:23
Matt says:
"..I'm not suggesting it not be added t
| |
| 181 | |
| 174 const URLRequestJobFactory* job_factory() const { return job_factory_; } | 182 const URLRequestJobFactory* job_factory() const { return job_factory_; } |
| 175 void set_job_factory(const URLRequestJobFactory* job_factory) { | 183 void set_job_factory(const URLRequestJobFactory* job_factory) { |
| 176 job_factory_ = job_factory; | 184 job_factory_ = job_factory; |
| 177 } | 185 } |
| 178 | 186 |
| 179 // May be NULL. | 187 // May be NULL. |
| 180 URLRequestThrottlerManager* throttler_manager() const { | 188 URLRequestThrottlerManager* throttler_manager() const { |
| 181 return throttler_manager_; | 189 return throttler_manager_; |
| 182 } | 190 } |
| 183 void set_throttler_manager(URLRequestThrottlerManager* throttler_manager) { | 191 void set_throttler_manager(URLRequestThrottlerManager* throttler_manager) { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 228 FraudulentCertificateReporter* fraudulent_certificate_reporter_; | 236 FraudulentCertificateReporter* fraudulent_certificate_reporter_; |
| 229 HttpAuthHandlerFactory* http_auth_handler_factory_; | 237 HttpAuthHandlerFactory* http_auth_handler_factory_; |
| 230 ProxyService* proxy_service_; | 238 ProxyService* proxy_service_; |
| 231 scoped_refptr<SSLConfigService> ssl_config_service_; | 239 scoped_refptr<SSLConfigService> ssl_config_service_; |
| 232 NetworkDelegate* network_delegate_; | 240 NetworkDelegate* network_delegate_; |
| 233 base::WeakPtr<HttpServerProperties> http_server_properties_; | 241 base::WeakPtr<HttpServerProperties> http_server_properties_; |
| 234 HttpUserAgentSettings* http_user_agent_settings_; | 242 HttpUserAgentSettings* http_user_agent_settings_; |
| 235 scoped_refptr<CookieStore> cookie_store_; | 243 scoped_refptr<CookieStore> cookie_store_; |
| 236 TransportSecurityState* transport_security_state_; | 244 TransportSecurityState* transport_security_state_; |
| 237 CTVerifier* cert_transparency_verifier_; | 245 CTVerifier* cert_transparency_verifier_; |
| 246 CertPolicyEnforcer* cert_policy_enforcer_; | |
| 238 HttpTransactionFactory* http_transaction_factory_; | 247 HttpTransactionFactory* http_transaction_factory_; |
| 239 const URLRequestJobFactory* job_factory_; | 248 const URLRequestJobFactory* job_factory_; |
| 240 URLRequestThrottlerManager* throttler_manager_; | 249 URLRequestThrottlerManager* throttler_manager_; |
| 241 SdchManager* sdch_manager_; | 250 SdchManager* sdch_manager_; |
| 242 | 251 |
| 243 // --------------------------------------------------------------------------- | 252 // --------------------------------------------------------------------------- |
| 244 // Important: When adding any new members below, consider whether they need to | 253 // Important: When adding any new members below, consider whether they need to |
| 245 // be added to CopyFrom. | 254 // be added to CopyFrom. |
| 246 // --------------------------------------------------------------------------- | 255 // --------------------------------------------------------------------------- |
| 247 | 256 |
| 248 scoped_ptr<std::set<const URLRequest*> > url_requests_; | 257 scoped_ptr<std::set<const URLRequest*> > url_requests_; |
| 249 | 258 |
| 250 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); | 259 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); |
| 251 }; | 260 }; |
| 252 | 261 |
| 253 } // namespace net | 262 } // namespace net |
| 254 | 263 |
| 255 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 264 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
| OLD | NEW |