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 #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 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 HttpAuthHandlerFactory* http_auth_handler_factory); | 55 HttpAuthHandlerFactory* http_auth_handler_factory); |
56 void set_proxy_service(ProxyService* proxy_service); | 56 void set_proxy_service(ProxyService* proxy_service); |
57 void set_ssl_config_service(SSLConfigService* ssl_config_service); | 57 void set_ssl_config_service(SSLConfigService* ssl_config_service); |
58 void set_network_delegate(NetworkDelegate* network_delegate); | 58 void set_network_delegate(NetworkDelegate* network_delegate); |
59 void set_http_server_properties(HttpServerProperties* http_server_properties); | 59 void set_http_server_properties(HttpServerProperties* http_server_properties); |
60 void set_cookie_store(CookieStore* cookie_store); | 60 void set_cookie_store(CookieStore* cookie_store); |
61 void set_transport_security_state( | 61 void set_transport_security_state( |
62 TransportSecurityState* transport_security_state); | 62 TransportSecurityState* transport_security_state); |
63 void set_http_transaction_factory( | 63 void set_http_transaction_factory( |
64 HttpTransactionFactory* http_transaction_factory); | 64 HttpTransactionFactory* http_transaction_factory); |
| 65 void set_ftp_transaction_factory( |
| 66 FtpTransactionFactory* ftp_transaction_factory); |
65 void set_job_factory(URLRequestJobFactory* job_factory); | 67 void set_job_factory(URLRequestJobFactory* job_factory); |
66 void set_throttler_manager(URLRequestThrottlerManager* throttler_manager); | 68 void set_throttler_manager(URLRequestThrottlerManager* throttler_manager); |
67 void set_http_user_agent_settings( | 69 void set_http_user_agent_settings( |
68 HttpUserAgentSettings* http_user_agent_settings); | 70 HttpUserAgentSettings* http_user_agent_settings); |
69 | 71 |
70 private: | 72 private: |
71 // We use a raw pointer to prevent reference cycles, since | 73 // We use a raw pointer to prevent reference cycles, since |
72 // URLRequestContextStorage can often be contained within a URLRequestContext | 74 // URLRequestContextStorage can often be contained within a URLRequestContext |
73 // subclass. | 75 // subclass. |
74 URLRequestContext* const context_; | 76 URLRequestContext* const context_; |
75 | 77 |
76 // Owned members. | 78 // Owned members. |
77 scoped_ptr<NetLog> net_log_; | 79 scoped_ptr<NetLog> net_log_; |
78 scoped_ptr<HostResolver> host_resolver_; | 80 scoped_ptr<HostResolver> host_resolver_; |
79 scoped_ptr<CertVerifier> cert_verifier_; | 81 scoped_ptr<CertVerifier> cert_verifier_; |
80 // The ServerBoundCertService must outlive the HttpTransactionFactory. | 82 // The ServerBoundCertService must outlive the HttpTransactionFactory. |
81 scoped_ptr<ServerBoundCertService> server_bound_cert_service_; | 83 scoped_ptr<ServerBoundCertService> server_bound_cert_service_; |
82 scoped_ptr<FraudulentCertificateReporter> fraudulent_certificate_reporter_; | 84 scoped_ptr<FraudulentCertificateReporter> fraudulent_certificate_reporter_; |
83 scoped_ptr<HttpAuthHandlerFactory> http_auth_handler_factory_; | 85 scoped_ptr<HttpAuthHandlerFactory> http_auth_handler_factory_; |
84 scoped_ptr<ProxyService> proxy_service_; | 86 scoped_ptr<ProxyService> proxy_service_; |
85 // TODO(willchan): Remove refcounting on these members. | 87 // TODO(willchan): Remove refcounting on these members. |
86 scoped_refptr<SSLConfigService> ssl_config_service_; | 88 scoped_refptr<SSLConfigService> ssl_config_service_; |
87 scoped_ptr<NetworkDelegate> network_delegate_; | 89 scoped_ptr<NetworkDelegate> network_delegate_; |
88 scoped_ptr<HttpServerProperties> http_server_properties_; | 90 scoped_ptr<HttpServerProperties> http_server_properties_; |
89 scoped_ptr<HttpUserAgentSettings> http_user_agent_settings_; | 91 scoped_ptr<HttpUserAgentSettings> http_user_agent_settings_; |
90 scoped_refptr<CookieStore> cookie_store_; | 92 scoped_refptr<CookieStore> cookie_store_; |
91 scoped_ptr<TransportSecurityState> transport_security_state_; | 93 scoped_ptr<TransportSecurityState> transport_security_state_; |
92 | 94 |
93 scoped_ptr<HttpTransactionFactory> http_transaction_factory_; | 95 scoped_ptr<HttpTransactionFactory> http_transaction_factory_; |
| 96 scoped_ptr<FtpTransactionFactory> ftp_transaction_factory_; |
94 scoped_ptr<URLRequestJobFactory> job_factory_; | 97 scoped_ptr<URLRequestJobFactory> job_factory_; |
95 scoped_ptr<URLRequestThrottlerManager> throttler_manager_; | 98 scoped_ptr<URLRequestThrottlerManager> throttler_manager_; |
96 | 99 |
97 DISALLOW_COPY_AND_ASSIGN(URLRequestContextStorage); | 100 DISALLOW_COPY_AND_ASSIGN(URLRequestContextStorage); |
98 }; | 101 }; |
99 | 102 |
100 } // namespace net | 103 } // namespace net |
101 | 104 |
102 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_STORAGE_H_ | 105 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_STORAGE_H_ |
OLD | NEW |