| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 12 #pragma once |
| 13 | 13 |
| 14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
| 17 #include "base/threading/non_thread_safe.h" | 17 #include "base/threading/non_thread_safe.h" |
| 18 #include "net/base/net_export.h" | 18 #include "net/base/net_export.h" |
| 19 #include "net/base/net_log.h" | 19 #include "net/base/net_log.h" |
| 20 #include "net/base/ssl_config_service.h" | 20 #include "net/base/ssl_config_service.h" |
| 21 #include "net/base/transport_security_state.h" | 21 #include "net/base/transport_security_state.h" |
| 22 #include "net/http/http_server_properties.h" | 22 #include "net/http/http_server_properties.h" |
| 23 #include "net/ftp/ftp_auth_cache.h" | 23 #include "net/ftp/ftp_auth_cache.h" |
| 24 | 24 |
| 25 namespace net { | 25 namespace net { |
| 26 class CertVerifier; | 26 class CertVerifier; |
| 27 class CookieStore; | 27 class CookieStore; |
| 28 class DnsCertProvenanceChecker; | |
| 29 class FraudulentCertificateReporter; | 28 class FraudulentCertificateReporter; |
| 30 class FtpTransactionFactory; | 29 class FtpTransactionFactory; |
| 31 class HostResolver; | 30 class HostResolver; |
| 32 class HttpAuthHandlerFactory; | 31 class HttpAuthHandlerFactory; |
| 33 class HttpTransactionFactory; | 32 class HttpTransactionFactory; |
| 34 class NetworkDelegate; | 33 class NetworkDelegate; |
| 35 class OriginBoundCertService; | 34 class OriginBoundCertService; |
| 36 class ProxyService; | 35 class ProxyService; |
| 37 class URLRequest; | 36 class URLRequest; |
| 38 class URLRequestJobFactory; | 37 class URLRequestJobFactory; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 79 |
| 81 OriginBoundCertService* origin_bound_cert_service() const { | 80 OriginBoundCertService* origin_bound_cert_service() const { |
| 82 return origin_bound_cert_service_; | 81 return origin_bound_cert_service_; |
| 83 } | 82 } |
| 84 | 83 |
| 85 void set_origin_bound_cert_service( | 84 void set_origin_bound_cert_service( |
| 86 OriginBoundCertService* origin_bound_cert_service) { | 85 OriginBoundCertService* origin_bound_cert_service) { |
| 87 origin_bound_cert_service_ = origin_bound_cert_service; | 86 origin_bound_cert_service_ = origin_bound_cert_service; |
| 88 } | 87 } |
| 89 | 88 |
| 90 DnsCertProvenanceChecker* dns_cert_checker() const { | |
| 91 return dns_cert_checker_; | |
| 92 } | |
| 93 void set_dns_cert_checker(DnsCertProvenanceChecker* dns_cert_checker) { | |
| 94 dns_cert_checker_ = dns_cert_checker; | |
| 95 } | |
| 96 | |
| 97 FraudulentCertificateReporter* fraudulent_certificate_reporter() const { | 89 FraudulentCertificateReporter* fraudulent_certificate_reporter() const { |
| 98 return fraudulent_certificate_reporter_; | 90 return fraudulent_certificate_reporter_; |
| 99 } | 91 } |
| 100 void set_fraudulent_certificate_reporter( | 92 void set_fraudulent_certificate_reporter( |
| 101 FraudulentCertificateReporter* fraudulent_certificate_reporter) { | 93 FraudulentCertificateReporter* fraudulent_certificate_reporter) { |
| 102 fraudulent_certificate_reporter_ = fraudulent_certificate_reporter; | 94 fraudulent_certificate_reporter_ = fraudulent_certificate_reporter; |
| 103 } | 95 } |
| 104 | 96 |
| 105 // Get the proxy service for this context. | 97 // Get the proxy service for this context. |
| 106 ProxyService* proxy_service() const { return proxy_service_; } | 98 ProxyService* proxy_service() const { return proxy_service_; } |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 // Important: When adding any new members below, consider whether they need to | 201 // Important: When adding any new members below, consider whether they need to |
| 210 // be added to CopyFrom. | 202 // be added to CopyFrom. |
| 211 // --------------------------------------------------------------------------- | 203 // --------------------------------------------------------------------------- |
| 212 | 204 |
| 213 // Ownership for these members are not defined here. Clients should either | 205 // Ownership for these members are not defined here. Clients should either |
| 214 // provide storage elsewhere or have a subclass take ownership. | 206 // provide storage elsewhere or have a subclass take ownership. |
| 215 NetLog* net_log_; | 207 NetLog* net_log_; |
| 216 HostResolver* host_resolver_; | 208 HostResolver* host_resolver_; |
| 217 CertVerifier* cert_verifier_; | 209 CertVerifier* cert_verifier_; |
| 218 OriginBoundCertService* origin_bound_cert_service_; | 210 OriginBoundCertService* origin_bound_cert_service_; |
| 219 DnsCertProvenanceChecker* dns_cert_checker_; | |
| 220 FraudulentCertificateReporter* fraudulent_certificate_reporter_; | 211 FraudulentCertificateReporter* fraudulent_certificate_reporter_; |
| 221 HttpAuthHandlerFactory* http_auth_handler_factory_; | 212 HttpAuthHandlerFactory* http_auth_handler_factory_; |
| 222 ProxyService* proxy_service_; | 213 ProxyService* proxy_service_; |
| 223 scoped_refptr<SSLConfigService> ssl_config_service_; | 214 scoped_refptr<SSLConfigService> ssl_config_service_; |
| 224 NetworkDelegate* network_delegate_; | 215 NetworkDelegate* network_delegate_; |
| 225 HttpServerProperties* http_server_properties_; | 216 HttpServerProperties* http_server_properties_; |
| 226 scoped_refptr<CookieStore> cookie_store_; | 217 scoped_refptr<CookieStore> cookie_store_; |
| 227 TransportSecurityState* transport_security_state_; | 218 TransportSecurityState* transport_security_state_; |
| 228 scoped_ptr<FtpAuthCache> ftp_auth_cache_; | 219 scoped_ptr<FtpAuthCache> ftp_auth_cache_; |
| 229 std::string accept_language_; | 220 std::string accept_language_; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 240 // Important: When adding any new members below, consider whether they need to | 231 // Important: When adding any new members below, consider whether they need to |
| 241 // be added to CopyFrom. | 232 // be added to CopyFrom. |
| 242 // --------------------------------------------------------------------------- | 233 // --------------------------------------------------------------------------- |
| 243 | 234 |
| 244 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); | 235 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); |
| 245 }; | 236 }; |
| 246 | 237 |
| 247 } // namespace net | 238 } // namespace net |
| 248 | 239 |
| 249 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 240 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
| OLD | NEW |