| 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" |
| 11 #include "net/base/net_export.h" | 11 #include "net/base/net_export.h" |
| 12 | 12 |
| 13 namespace net { | 13 namespace net { |
| 14 | 14 |
| 15 class CertVerifier; | 15 class CertVerifier; |
| 16 class ChannelIDService; | 16 class ChannelIDService; |
| 17 class CookieStore; | 17 class CookieStore; |
| 18 class FraudulentCertificateReporter; | |
| 19 class FtpTransactionFactory; | 18 class FtpTransactionFactory; |
| 20 class HostResolver; | 19 class HostResolver; |
| 21 class HttpAuthHandlerFactory; | 20 class HttpAuthHandlerFactory; |
| 22 class HttpServerProperties; | 21 class HttpServerProperties; |
| 23 class HttpTransactionFactory; | 22 class HttpTransactionFactory; |
| 24 class HttpUserAgentSettings; | 23 class HttpUserAgentSettings; |
| 25 class NetLog; | 24 class NetLog; |
| 26 class NetworkDelegate; | 25 class NetworkDelegate; |
| 27 class ProxyService; | 26 class ProxyService; |
| 28 class SdchManager; | 27 class SdchManager; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 43 explicit URLRequestContextStorage(URLRequestContext* context); | 42 explicit URLRequestContextStorage(URLRequestContext* context); |
| 44 ~URLRequestContextStorage(); | 43 ~URLRequestContextStorage(); |
| 45 | 44 |
| 46 // These setters will set both the member variables and call the setter on the | 45 // These setters will set both the member variables and call the setter on the |
| 47 // URLRequestContext object. In all cases, ownership is passed to |this|. | 46 // URLRequestContext object. In all cases, ownership is passed to |this|. |
| 48 | 47 |
| 49 void set_net_log(NetLog* net_log); | 48 void set_net_log(NetLog* net_log); |
| 50 void set_host_resolver(scoped_ptr<HostResolver> host_resolver); | 49 void set_host_resolver(scoped_ptr<HostResolver> host_resolver); |
| 51 void set_cert_verifier(CertVerifier* cert_verifier); | 50 void set_cert_verifier(CertVerifier* cert_verifier); |
| 52 void set_channel_id_service(scoped_ptr<ChannelIDService> channel_id_service); | 51 void set_channel_id_service(scoped_ptr<ChannelIDService> channel_id_service); |
| 53 void set_fraudulent_certificate_reporter( | |
| 54 FraudulentCertificateReporter* fraudulent_certificate_reporter); | |
| 55 void set_http_auth_handler_factory( | 52 void set_http_auth_handler_factory( |
| 56 HttpAuthHandlerFactory* http_auth_handler_factory); | 53 HttpAuthHandlerFactory* http_auth_handler_factory); |
| 57 void set_proxy_service(ProxyService* proxy_service); | 54 void set_proxy_service(ProxyService* proxy_service); |
| 58 void set_ssl_config_service(SSLConfigService* ssl_config_service); | 55 void set_ssl_config_service(SSLConfigService* ssl_config_service); |
| 59 void set_network_delegate(NetworkDelegate* network_delegate); | 56 void set_network_delegate(NetworkDelegate* network_delegate); |
| 60 void set_http_server_properties( | 57 void set_http_server_properties( |
| 61 scoped_ptr<HttpServerProperties> http_server_properties); | 58 scoped_ptr<HttpServerProperties> http_server_properties); |
| 62 void set_cookie_store(CookieStore* cookie_store); | 59 void set_cookie_store(CookieStore* cookie_store); |
| 63 void set_transport_security_state( | 60 void set_transport_security_state( |
| 64 TransportSecurityState* transport_security_state); | 61 TransportSecurityState* transport_security_state); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 76 // URLRequestContextStorage can often be contained within a URLRequestContext | 73 // URLRequestContextStorage can often be contained within a URLRequestContext |
| 77 // subclass. | 74 // subclass. |
| 78 URLRequestContext* const context_; | 75 URLRequestContext* const context_; |
| 79 | 76 |
| 80 // Owned members. | 77 // Owned members. |
| 81 scoped_ptr<NetLog> net_log_; | 78 scoped_ptr<NetLog> net_log_; |
| 82 scoped_ptr<HostResolver> host_resolver_; | 79 scoped_ptr<HostResolver> host_resolver_; |
| 83 scoped_ptr<CertVerifier> cert_verifier_; | 80 scoped_ptr<CertVerifier> cert_verifier_; |
| 84 // The ChannelIDService must outlive the HttpTransactionFactory. | 81 // The ChannelIDService must outlive the HttpTransactionFactory. |
| 85 scoped_ptr<ChannelIDService> channel_id_service_; | 82 scoped_ptr<ChannelIDService> channel_id_service_; |
| 86 scoped_ptr<FraudulentCertificateReporter> fraudulent_certificate_reporter_; | |
| 87 scoped_ptr<HttpAuthHandlerFactory> http_auth_handler_factory_; | 83 scoped_ptr<HttpAuthHandlerFactory> http_auth_handler_factory_; |
| 88 scoped_ptr<ProxyService> proxy_service_; | 84 scoped_ptr<ProxyService> proxy_service_; |
| 89 // TODO(willchan): Remove refcounting on these members. | 85 // TODO(willchan): Remove refcounting on these members. |
| 90 scoped_refptr<SSLConfigService> ssl_config_service_; | 86 scoped_refptr<SSLConfigService> ssl_config_service_; |
| 91 scoped_ptr<NetworkDelegate> network_delegate_; | 87 scoped_ptr<NetworkDelegate> network_delegate_; |
| 92 scoped_ptr<HttpServerProperties> http_server_properties_; | 88 scoped_ptr<HttpServerProperties> http_server_properties_; |
| 93 scoped_ptr<HttpUserAgentSettings> http_user_agent_settings_; | 89 scoped_ptr<HttpUserAgentSettings> http_user_agent_settings_; |
| 94 scoped_refptr<CookieStore> cookie_store_; | 90 scoped_refptr<CookieStore> cookie_store_; |
| 95 scoped_ptr<TransportSecurityState> transport_security_state_; | 91 scoped_ptr<TransportSecurityState> transport_security_state_; |
| 96 | 92 |
| 97 scoped_ptr<HttpTransactionFactory> http_transaction_factory_; | 93 scoped_ptr<HttpTransactionFactory> http_transaction_factory_; |
| 98 scoped_ptr<URLRequestJobFactory> job_factory_; | 94 scoped_ptr<URLRequestJobFactory> job_factory_; |
| 99 scoped_ptr<URLRequestThrottlerManager> throttler_manager_; | 95 scoped_ptr<URLRequestThrottlerManager> throttler_manager_; |
| 100 scoped_ptr<URLRequestBackoffManager> backoff_manager_; | 96 scoped_ptr<URLRequestBackoffManager> backoff_manager_; |
| 101 scoped_ptr<SdchManager> sdch_manager_; | 97 scoped_ptr<SdchManager> sdch_manager_; |
| 102 | 98 |
| 103 DISALLOW_COPY_AND_ASSIGN(URLRequestContextStorage); | 99 DISALLOW_COPY_AND_ASSIGN(URLRequestContextStorage); |
| 104 }; | 100 }; |
| 105 | 101 |
| 106 } // namespace net | 102 } // namespace net |
| 107 | 103 |
| 108 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_STORAGE_H_ | 104 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_STORAGE_H_ |
| OLD | NEW |