| 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 <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 class HostResolver; | 21 class HostResolver; |
| 22 class HttpAuthHandlerFactory; | 22 class HttpAuthHandlerFactory; |
| 23 class HttpNetworkSession; | 23 class HttpNetworkSession; |
| 24 class HttpServerProperties; | 24 class HttpServerProperties; |
| 25 class HttpTransactionFactory; | 25 class HttpTransactionFactory; |
| 26 class HttpUserAgentSettings; | 26 class HttpUserAgentSettings; |
| 27 class NetLog; | 27 class NetLog; |
| 28 class NetworkDelegate; | 28 class NetworkDelegate; |
| 29 class ProxyDelegate; | 29 class ProxyDelegate; |
| 30 class ProxyService; | 30 class ProxyService; |
| 31 class ReportingService; |
| 31 class SdchManager; | 32 class SdchManager; |
| 32 class SSLConfigService; | 33 class SSLConfigService; |
| 33 class TransportSecurityState; | 34 class TransportSecurityState; |
| 34 class URLRequestContext; | 35 class URLRequestContext; |
| 35 class URLRequestJobFactory; | 36 class URLRequestJobFactory; |
| 36 class URLRequestThrottlerManager; | 37 class URLRequestThrottlerManager; |
| 37 | 38 |
| 38 // URLRequestContextStorage is a helper class that provides storage for unowned | 39 // URLRequestContextStorage is a helper class that provides storage for unowned |
| 39 // member variables of URLRequestContext. | 40 // member variables of URLRequestContext. |
| 40 class NET_EXPORT URLRequestContextStorage { | 41 class NET_EXPORT URLRequestContextStorage { |
| (...skipping 30 matching lines...) Expand all Loading... |
| 71 void set_http_network_session( | 72 void set_http_network_session( |
| 72 std::unique_ptr<HttpNetworkSession> http_network_session); | 73 std::unique_ptr<HttpNetworkSession> http_network_session); |
| 73 void set_http_transaction_factory( | 74 void set_http_transaction_factory( |
| 74 std::unique_ptr<HttpTransactionFactory> http_transaction_factory); | 75 std::unique_ptr<HttpTransactionFactory> http_transaction_factory); |
| 75 void set_job_factory(std::unique_ptr<URLRequestJobFactory> job_factory); | 76 void set_job_factory(std::unique_ptr<URLRequestJobFactory> job_factory); |
| 76 void set_throttler_manager( | 77 void set_throttler_manager( |
| 77 std::unique_ptr<URLRequestThrottlerManager> throttler_manager); | 78 std::unique_ptr<URLRequestThrottlerManager> throttler_manager); |
| 78 void set_http_user_agent_settings( | 79 void set_http_user_agent_settings( |
| 79 std::unique_ptr<HttpUserAgentSettings> http_user_agent_settings); | 80 std::unique_ptr<HttpUserAgentSettings> http_user_agent_settings); |
| 80 void set_sdch_manager(std::unique_ptr<SdchManager> sdch_manager); | 81 void set_sdch_manager(std::unique_ptr<SdchManager> sdch_manager); |
| 82 void set_reporting_service( |
| 83 std::unique_ptr<ReportingService> reporting_service); |
| 81 | 84 |
| 82 // Everything else can be access through the URLRequestContext, but this | 85 // Everything else can be access through the URLRequestContext, but this |
| 83 // cannot. Having an accessor for it makes usage a little cleaner. | 86 // cannot. Having an accessor for it makes usage a little cleaner. |
| 84 HttpNetworkSession* http_network_session() const { | 87 HttpNetworkSession* http_network_session() const { |
| 85 return http_network_session_.get(); | 88 return http_network_session_.get(); |
| 86 } | 89 } |
| 87 | 90 |
| 88 private: | 91 private: |
| 89 // Not owned. | 92 // Not owned. |
| 90 URLRequestContext* const context_; | 93 URLRequestContext* const context_; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 109 std::unique_ptr<CTPolicyEnforcer> ct_policy_enforcer_; | 112 std::unique_ptr<CTPolicyEnforcer> ct_policy_enforcer_; |
| 110 | 113 |
| 111 // Not actually pointed at by the URLRequestContext, but may be used (but not | 114 // Not actually pointed at by the URLRequestContext, but may be used (but not |
| 112 // owned) by the HttpTransactionFactory. | 115 // owned) by the HttpTransactionFactory. |
| 113 std::unique_ptr<HttpNetworkSession> http_network_session_; | 116 std::unique_ptr<HttpNetworkSession> http_network_session_; |
| 114 | 117 |
| 115 std::unique_ptr<HttpTransactionFactory> http_transaction_factory_; | 118 std::unique_ptr<HttpTransactionFactory> http_transaction_factory_; |
| 116 std::unique_ptr<URLRequestJobFactory> job_factory_; | 119 std::unique_ptr<URLRequestJobFactory> job_factory_; |
| 117 std::unique_ptr<URLRequestThrottlerManager> throttler_manager_; | 120 std::unique_ptr<URLRequestThrottlerManager> throttler_manager_; |
| 118 std::unique_ptr<SdchManager> sdch_manager_; | 121 std::unique_ptr<SdchManager> sdch_manager_; |
| 122 std::unique_ptr<ReportingService> reporting_service_; |
| 119 | 123 |
| 120 DISALLOW_COPY_AND_ASSIGN(URLRequestContextStorage); | 124 DISALLOW_COPY_AND_ASSIGN(URLRequestContextStorage); |
| 121 }; | 125 }; |
| 122 | 126 |
| 123 } // namespace net | 127 } // namespace net |
| 124 | 128 |
| 125 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_STORAGE_H_ | 129 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_STORAGE_H_ |
| OLD | NEW |