| 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; |   18 class FraudulentCertificateReporter; | 
|   19 class FtpTransactionFactory; |   19 class FtpTransactionFactory; | 
|   20 class HostResolver; |   20 class HostResolver; | 
|   21 class HttpAuthHandlerFactory; |   21 class HttpAuthHandlerFactory; | 
|   22 class HttpServerProperties; |   22 class HttpServerProperties; | 
|   23 class HttpTransactionFactory; |   23 class HttpTransactionFactory; | 
|   24 class HttpUserAgentSettings; |   24 class HttpUserAgentSettings; | 
|   25 class NetLog; |   25 class NetLog; | 
|   26 class NetworkDelegate; |   26 class NetworkDelegate; | 
|   27 class ProxyService; |   27 class ProxyService; | 
 |   28 class SdchManager; | 
|   28 class SSLConfigService; |   29 class SSLConfigService; | 
|   29 class TransportSecurityState; |   30 class TransportSecurityState; | 
|   30 class URLRequestContext; |   31 class URLRequestContext; | 
|   31 class URLRequestJobFactory; |   32 class URLRequestJobFactory; | 
|   32 class URLRequestThrottlerManager; |   33 class URLRequestThrottlerManager; | 
|   33  |   34  | 
|   34 // URLRequestContextStorage is a helper class that provides storage for unowned |   35 // URLRequestContextStorage is a helper class that provides storage for unowned | 
|   35 // member variables of URLRequestContext. |   36 // member variables of URLRequestContext. | 
|   36 class NET_EXPORT URLRequestContextStorage { |   37 class NET_EXPORT URLRequestContextStorage { | 
|   37  public: |   38  public: | 
| (...skipping 22 matching lines...) Expand all  Loading... | 
|   60       scoped_ptr<HttpServerProperties> http_server_properties); |   61       scoped_ptr<HttpServerProperties> http_server_properties); | 
|   61   void set_cookie_store(CookieStore* cookie_store); |   62   void set_cookie_store(CookieStore* cookie_store); | 
|   62   void set_transport_security_state( |   63   void set_transport_security_state( | 
|   63       TransportSecurityState* transport_security_state); |   64       TransportSecurityState* transport_security_state); | 
|   64   void set_http_transaction_factory( |   65   void set_http_transaction_factory( | 
|   65       HttpTransactionFactory* http_transaction_factory); |   66       HttpTransactionFactory* http_transaction_factory); | 
|   66   void set_job_factory(URLRequestJobFactory* job_factory); |   67   void set_job_factory(URLRequestJobFactory* job_factory); | 
|   67   void set_throttler_manager(URLRequestThrottlerManager* throttler_manager); |   68   void set_throttler_manager(URLRequestThrottlerManager* throttler_manager); | 
|   68   void set_http_user_agent_settings( |   69   void set_http_user_agent_settings( | 
|   69       HttpUserAgentSettings* http_user_agent_settings); |   70       HttpUserAgentSettings* http_user_agent_settings); | 
 |   71   void set_sdch_manager(scoped_ptr<SdchManager> sdch_manager); | 
|   70  |   72  | 
|   71  private: |   73  private: | 
|   72   // We use a raw pointer to prevent reference cycles, since |   74   // We use a raw pointer to prevent reference cycles, since | 
|   73   // URLRequestContextStorage can often be contained within a URLRequestContext |   75   // URLRequestContextStorage can often be contained within a URLRequestContext | 
|   74   // subclass. |   76   // subclass. | 
|   75   URLRequestContext* const context_; |   77   URLRequestContext* const context_; | 
|   76  |   78  | 
|   77   // Owned members. |   79   // Owned members. | 
|   78   scoped_ptr<NetLog> net_log_; |   80   scoped_ptr<NetLog> net_log_; | 
|   79   scoped_ptr<HostResolver> host_resolver_; |   81   scoped_ptr<HostResolver> host_resolver_; | 
|   80   scoped_ptr<CertVerifier> cert_verifier_; |   82   scoped_ptr<CertVerifier> cert_verifier_; | 
|   81   // The ChannelIDService must outlive the HttpTransactionFactory. |   83   // The ChannelIDService must outlive the HttpTransactionFactory. | 
|   82   scoped_ptr<ChannelIDService> channel_id_service_; |   84   scoped_ptr<ChannelIDService> channel_id_service_; | 
|   83   scoped_ptr<FraudulentCertificateReporter> fraudulent_certificate_reporter_; |   85   scoped_ptr<FraudulentCertificateReporter> fraudulent_certificate_reporter_; | 
|   84   scoped_ptr<HttpAuthHandlerFactory> http_auth_handler_factory_; |   86   scoped_ptr<HttpAuthHandlerFactory> http_auth_handler_factory_; | 
|   85   scoped_ptr<ProxyService> proxy_service_; |   87   scoped_ptr<ProxyService> proxy_service_; | 
|   86   // TODO(willchan): Remove refcounting on these members. |   88   // TODO(willchan): Remove refcounting on these members. | 
|   87   scoped_refptr<SSLConfigService> ssl_config_service_; |   89   scoped_refptr<SSLConfigService> ssl_config_service_; | 
|   88   scoped_ptr<NetworkDelegate> network_delegate_; |   90   scoped_ptr<NetworkDelegate> network_delegate_; | 
|   89   scoped_ptr<HttpServerProperties> http_server_properties_; |   91   scoped_ptr<HttpServerProperties> http_server_properties_; | 
|   90   scoped_ptr<HttpUserAgentSettings> http_user_agent_settings_; |   92   scoped_ptr<HttpUserAgentSettings> http_user_agent_settings_; | 
|   91   scoped_refptr<CookieStore> cookie_store_; |   93   scoped_refptr<CookieStore> cookie_store_; | 
|   92   scoped_ptr<TransportSecurityState> transport_security_state_; |   94   scoped_ptr<TransportSecurityState> transport_security_state_; | 
|   93  |   95  | 
|   94   scoped_ptr<HttpTransactionFactory> http_transaction_factory_; |   96   scoped_ptr<HttpTransactionFactory> http_transaction_factory_; | 
|   95   scoped_ptr<URLRequestJobFactory> job_factory_; |   97   scoped_ptr<URLRequestJobFactory> job_factory_; | 
|   96   scoped_ptr<URLRequestThrottlerManager> throttler_manager_; |   98   scoped_ptr<URLRequestThrottlerManager> throttler_manager_; | 
 |   99   scoped_ptr<SdchManager> sdch_manager_; | 
|   97  |  100  | 
|   98   DISALLOW_COPY_AND_ASSIGN(URLRequestContextStorage); |  101   DISALLOW_COPY_AND_ASSIGN(URLRequestContextStorage); | 
|   99 }; |  102 }; | 
|  100  |  103  | 
|  101 }  // namespace net |  104 }  // namespace net | 
|  102  |  105  | 
|  103 #endif  // NET_URL_REQUEST_URL_REQUEST_CONTEXT_STORAGE_H_ |  106 #endif  // NET_URL_REQUEST_URL_REQUEST_CONTEXT_STORAGE_H_ | 
| OLD | NEW |