| 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 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_STORAGE_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_STORAGE_H_ |
| 6 #define NET_URL_REQUEST_URL_REQUEST_CONTEXT_STORAGE_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_CONTEXT_STORAGE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "net/base/net_export.h" | 12 #include "net/base/net_export.h" |
| 13 | 13 |
| 14 namespace net { | 14 namespace net { |
| 15 | 15 |
| 16 class CertVerifier; | 16 class CertVerifier; |
| 17 class CookieStore; | 17 class CookieStore; |
| 18 class DnsCertProvenanceChecker; | 18 class DnsCertProvenanceChecker; |
| 19 class DnsRRResolver; | |
| 20 class FraudulentCertificateReporter; | 19 class FraudulentCertificateReporter; |
| 21 class FtpTransactionFactory; | 20 class FtpTransactionFactory; |
| 22 class HostResolver; | 21 class HostResolver; |
| 23 class HttpAuthHandlerFactory; | 22 class HttpAuthHandlerFactory; |
| 24 class HttpServerProperties; | 23 class HttpServerProperties; |
| 25 class HttpTransactionFactory; | 24 class HttpTransactionFactory; |
| 26 class NetLog; | 25 class NetLog; |
| 27 class NetworkDelegate; | 26 class NetworkDelegate; |
| 28 class OriginBoundCertService; | 27 class OriginBoundCertService; |
| 29 class ProxyService; | 28 class ProxyService; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 43 ~URLRequestContextStorage(); | 42 ~URLRequestContextStorage(); |
| 44 | 43 |
| 45 // These setters will set both the member variables and call the setter on the | 44 // These setters will set both the member variables and call the setter on the |
| 46 // URLRequestContext object. | 45 // URLRequestContext object. |
| 47 | 46 |
| 48 void set_net_log(NetLog* net_log); | 47 void set_net_log(NetLog* net_log); |
| 49 void set_host_resolver(HostResolver* host_resolver); | 48 void set_host_resolver(HostResolver* host_resolver); |
| 50 void set_cert_verifier(CertVerifier* cert_verifier); | 49 void set_cert_verifier(CertVerifier* cert_verifier); |
| 51 void set_origin_bound_cert_service( | 50 void set_origin_bound_cert_service( |
| 52 OriginBoundCertService* origin_bound_cert_service); | 51 OriginBoundCertService* origin_bound_cert_service); |
| 53 void set_dnsrr_resolver(DnsRRResolver* dnsrr_resolver); | |
| 54 void set_dns_cert_checker(DnsCertProvenanceChecker* dns_cert_checker); | 52 void set_dns_cert_checker(DnsCertProvenanceChecker* dns_cert_checker); |
| 55 void set_fraudulent_certificate_reporter( | 53 void set_fraudulent_certificate_reporter( |
| 56 FraudulentCertificateReporter* fraudulent_certificate_reporter); | 54 FraudulentCertificateReporter* fraudulent_certificate_reporter); |
| 57 void set_http_auth_handler_factory( | 55 void set_http_auth_handler_factory( |
| 58 HttpAuthHandlerFactory* http_auth_handler_factory); | 56 HttpAuthHandlerFactory* http_auth_handler_factory); |
| 59 void set_proxy_service(ProxyService* proxy_service); | 57 void set_proxy_service(ProxyService* proxy_service); |
| 60 void set_ssl_config_service(SSLConfigService* ssl_config_service); | 58 void set_ssl_config_service(SSLConfigService* ssl_config_service); |
| 61 void set_network_delegate(NetworkDelegate* network_delegate); | 59 void set_network_delegate(NetworkDelegate* network_delegate); |
| 62 void set_http_server_properties(HttpServerProperties* http_server_properties); | 60 void set_http_server_properties(HttpServerProperties* http_server_properties); |
| 63 void set_cookie_store(CookieStore* cookie_store); | 61 void set_cookie_store(CookieStore* cookie_store); |
| 64 void set_transport_security_state( | 62 void set_transport_security_state( |
| 65 TransportSecurityState* transport_security_state); | 63 TransportSecurityState* transport_security_state); |
| 66 void set_http_transaction_factory( | 64 void set_http_transaction_factory( |
| 67 HttpTransactionFactory* http_transaction_factory); | 65 HttpTransactionFactory* http_transaction_factory); |
| 68 void set_ftp_transaction_factory( | 66 void set_ftp_transaction_factory( |
| 69 FtpTransactionFactory* ftp_transaction_factory); | 67 FtpTransactionFactory* ftp_transaction_factory); |
| 70 void set_job_factory(URLRequestJobFactory* job_factory); | 68 void set_job_factory(URLRequestJobFactory* job_factory); |
| 71 | 69 |
| 72 private: | 70 private: |
| 73 // We use a raw pointer to prevent reference cycles, since | 71 // We use a raw pointer to prevent reference cycles, since |
| 74 // URLRequestContextStorage can often be contained within a URLRequestContext | 72 // URLRequestContextStorage can often be contained within a URLRequestContext |
| 75 // subclass. | 73 // subclass. |
| 76 URLRequestContext* const context_; | 74 URLRequestContext* const context_; |
| 77 | 75 |
| 78 // Owned members. | 76 // Owned members. |
| 79 scoped_ptr<NetLog> net_log_; | 77 scoped_ptr<NetLog> net_log_; |
| 80 scoped_ptr<HostResolver> host_resolver_; | 78 scoped_ptr<HostResolver> host_resolver_; |
| 81 scoped_ptr<CertVerifier> cert_verifier_; | 79 scoped_ptr<CertVerifier> cert_verifier_; |
| 82 scoped_ptr<OriginBoundCertService> origin_bound_cert_service_; | 80 scoped_ptr<OriginBoundCertService> origin_bound_cert_service_; |
| 83 scoped_ptr<DnsRRResolver> dnsrr_resolver_; | |
| 84 scoped_ptr<DnsCertProvenanceChecker> dns_cert_checker_; | 81 scoped_ptr<DnsCertProvenanceChecker> dns_cert_checker_; |
| 85 scoped_ptr<FraudulentCertificateReporter> fraudulent_certificate_reporter_; | 82 scoped_ptr<FraudulentCertificateReporter> fraudulent_certificate_reporter_; |
| 86 scoped_ptr<HttpAuthHandlerFactory> http_auth_handler_factory_; | 83 scoped_ptr<HttpAuthHandlerFactory> http_auth_handler_factory_; |
| 87 scoped_ptr<ProxyService> proxy_service_; | 84 scoped_ptr<ProxyService> proxy_service_; |
| 88 // TODO(willchan): Remove refcounting on these members. | 85 // TODO(willchan): Remove refcounting on these members. |
| 89 scoped_refptr<SSLConfigService> ssl_config_service_; | 86 scoped_refptr<SSLConfigService> ssl_config_service_; |
| 90 scoped_ptr<NetworkDelegate> network_delegate_; | 87 scoped_ptr<NetworkDelegate> network_delegate_; |
| 91 scoped_ptr<HttpServerProperties> http_server_properties_; | 88 scoped_ptr<HttpServerProperties> http_server_properties_; |
| 92 scoped_refptr<CookieStore> cookie_store_; | 89 scoped_refptr<CookieStore> cookie_store_; |
| 93 scoped_ptr<TransportSecurityState> transport_security_state_; | 90 scoped_ptr<TransportSecurityState> transport_security_state_; |
| 94 | 91 |
| 95 scoped_ptr<HttpTransactionFactory> http_transaction_factory_; | 92 scoped_ptr<HttpTransactionFactory> http_transaction_factory_; |
| 96 scoped_ptr<FtpTransactionFactory> ftp_transaction_factory_; | 93 scoped_ptr<FtpTransactionFactory> ftp_transaction_factory_; |
| 97 scoped_ptr<URLRequestJobFactory> job_factory_; | 94 scoped_ptr<URLRequestJobFactory> job_factory_; |
| 98 | 95 |
| 99 DISALLOW_COPY_AND_ASSIGN(URLRequestContextStorage); | 96 DISALLOW_COPY_AND_ASSIGN(URLRequestContextStorage); |
| 100 }; | 97 }; |
| 101 | 98 |
| 102 } // namespace net | 99 } // namespace net |
| 103 | 100 |
| 104 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_STORAGE_H_ | 101 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_STORAGE_H_ |
| OLD | NEW |