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