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 CHROME_BROWSER_IO_THREAD_H_ | 5 #ifndef CHROME_BROWSER_IO_THREAD_H_ |
6 #define CHROME_BROWSER_IO_THREAD_H_ | 6 #define CHROME_BROWSER_IO_THREAD_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 class ChromeDataUseAscriber; | 70 class ChromeDataUseAscriber; |
71 } | 71 } |
72 | 72 |
73 namespace extensions { | 73 namespace extensions { |
74 class EventRouterForwarder; | 74 class EventRouterForwarder; |
75 } | 75 } |
76 | 76 |
77 namespace net { | 77 namespace net { |
78 class CTPolicyEnforcer; | 78 class CTPolicyEnforcer; |
79 class CertVerifier; | 79 class CertVerifier; |
80 class ChannelIDService; | |
81 class CookieStore; | |
82 class CTLogVerifier; | 80 class CTLogVerifier; |
83 class HostMappingRules; | 81 class HostMappingRules; |
84 class HostResolver; | 82 class HostResolver; |
85 class HttpAuthPreferences; | 83 class HttpAuthPreferences; |
86 class HttpServerProperties; | 84 class HttpServerProperties; |
87 class HttpTransactionFactory; | 85 class HttpTransactionFactory; |
88 class HttpUserAgentSettings; | 86 class HttpUserAgentSettings; |
89 class LoggingNetworkChangeObserver; | 87 class LoggingNetworkChangeObserver; |
90 class NetworkDelegate; | 88 class NetworkDelegate; |
91 class NetworkQualityEstimator; | 89 class NetworkQualityEstimator; |
92 class ProxyConfigService; | 90 class ProxyConfigService; |
93 class ProxyService; | 91 class ProxyService; |
94 class SSLConfigService; | 92 class SSLConfigService; |
95 class TransportSecurityState; | 93 class TransportSecurityState; |
96 class URLRequestContext; | 94 class URLRequestContext; |
97 class URLRequestContextGetter; | 95 class URLRequestContextGetter; |
| 96 class URLRequestContextStorage; |
98 class URLRequestJobFactory; | 97 class URLRequestJobFactory; |
99 | 98 |
100 namespace ct { | 99 namespace ct { |
101 class STHObserver; | 100 class STHObserver; |
102 } | 101 } |
103 | 102 |
104 } // namespace net | 103 } // namespace net |
105 | 104 |
106 namespace net_log { | 105 namespace net_log { |
107 class ChromeNetLog; | 106 class ChromeNetLog; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 std::unique_ptr<data_usage::DataUseAggregator> data_use_aggregator; | 143 std::unique_ptr<data_usage::DataUseAggregator> data_use_aggregator; |
145 #if defined(OS_ANDROID) | 144 #if defined(OS_ANDROID) |
146 // An external observer of data use. | 145 // An external observer of data use. |
147 std::unique_ptr<chrome::android::ExternalDataUseObserver> | 146 std::unique_ptr<chrome::android::ExternalDataUseObserver> |
148 external_data_use_observer; | 147 external_data_use_observer; |
149 #endif // defined(OS_ANDROID) | 148 #endif // defined(OS_ANDROID) |
150 // The "system" NetworkDelegate, used for Profile-agnostic network events. | 149 // The "system" NetworkDelegate, used for Profile-agnostic network events. |
151 std::unique_ptr<net::NetworkDelegate> system_network_delegate; | 150 std::unique_ptr<net::NetworkDelegate> system_network_delegate; |
152 std::unique_ptr<net::HostResolver> host_resolver; | 151 std::unique_ptr<net::HostResolver> host_resolver; |
153 std::unique_ptr<net::CertVerifier> cert_verifier; | 152 std::unique_ptr<net::CertVerifier> cert_verifier; |
154 // The ChannelIDService must outlive the HttpTransactionFactory. | |
155 std::unique_ptr<net::ChannelIDService> system_channel_id_service; | |
156 // This TransportSecurityState doesn't load or save any state. It's only | 153 // This TransportSecurityState doesn't load or save any state. It's only |
157 // used to enforce pinning for system requests and will only use built-in | 154 // used to enforce pinning for system requests and will only use built-in |
158 // pins. | 155 // pins. |
159 std::unique_ptr<net::TransportSecurityState> transport_security_state; | 156 std::unique_ptr<net::TransportSecurityState> transport_security_state; |
160 std::vector<scoped_refptr<const net::CTLogVerifier>> ct_logs; | 157 std::vector<scoped_refptr<const net::CTLogVerifier>> ct_logs; |
161 std::unique_ptr<net::CTVerifier> cert_transparency_verifier; | 158 std::unique_ptr<net::CTVerifier> cert_transparency_verifier; |
162 std::unique_ptr<net::CTPolicyEnforcer> ct_policy_enforcer; | 159 std::unique_ptr<net::CTPolicyEnforcer> ct_policy_enforcer; |
163 scoped_refptr<net::SSLConfigService> ssl_config_service; | 160 scoped_refptr<net::SSLConfigService> ssl_config_service; |
164 std::unique_ptr<net::HttpAuthHandlerFactory> http_auth_handler_factory; | 161 std::unique_ptr<net::HttpAuthHandlerFactory> http_auth_handler_factory; |
165 std::unique_ptr<net::HttpServerProperties> http_server_properties; | 162 std::unique_ptr<net::HttpServerProperties> http_server_properties; |
166 std::unique_ptr<net::ProxyService> proxy_script_fetcher_proxy_service; | 163 std::unique_ptr<net::ProxyService> proxy_script_fetcher_proxy_service; |
167 std::unique_ptr<net::HttpNetworkSession> | 164 std::unique_ptr<net::HttpNetworkSession> |
168 proxy_script_fetcher_http_network_session; | 165 proxy_script_fetcher_http_network_session; |
169 std::unique_ptr<net::HttpTransactionFactory> | 166 std::unique_ptr<net::HttpTransactionFactory> |
170 proxy_script_fetcher_http_transaction_factory; | 167 proxy_script_fetcher_http_transaction_factory; |
171 std::unique_ptr<net::URLRequestJobFactory> | 168 std::unique_ptr<net::URLRequestJobFactory> |
172 proxy_script_fetcher_url_request_job_factory; | 169 proxy_script_fetcher_url_request_job_factory; |
173 std::unique_ptr<net::HttpAuthPreferences> http_auth_preferences; | 170 std::unique_ptr<net::HttpAuthPreferences> http_auth_preferences; |
174 // TODO(willchan): Remove proxy script fetcher context since it's not | 171 // TODO(willchan): Remove proxy script fetcher context since it's not |
175 // necessary now that I got rid of refcounting URLRequestContexts. | 172 // necessary now that I got rid of refcounting URLRequestContexts. |
176 // | 173 // |
177 // The first URLRequestContext is |system_url_request_context|. We introduce | 174 // The first URLRequestContext is |system_url_request_context|. We introduce |
178 // |proxy_script_fetcher_context| for the second context. It has a direct | 175 // |proxy_script_fetcher_context| for the second context. It has a direct |
179 // ProxyService, since we always directly connect to fetch the PAC script. | 176 // ProxyService, since we always directly connect to fetch the PAC script. |
180 std::unique_ptr<net::URLRequestContext> proxy_script_fetcher_context; | 177 std::unique_ptr<net::URLRequestContext> proxy_script_fetcher_context; |
181 std::unique_ptr<net::ProxyService> system_proxy_service; | 178 std::unique_ptr<net::URLRequestContextStorage> |
182 std::unique_ptr<net::HttpNetworkSession> system_http_network_session; | 179 system_request_context_storage; |
183 std::unique_ptr<net::HttpTransactionFactory> | |
184 system_http_transaction_factory; | |
185 std::unique_ptr<net::URLRequestJobFactory> system_url_request_job_factory; | |
186 std::unique_ptr<net::URLRequestContext> system_request_context; | 180 std::unique_ptr<net::URLRequestContext> system_request_context; |
187 SystemRequestContextLeakChecker system_request_context_leak_checker; | 181 SystemRequestContextLeakChecker system_request_context_leak_checker; |
188 // |system_cookie_store| and |system_channel_id_service| are shared | |
189 // between |proxy_script_fetcher_context| and |system_request_context|. | |
190 std::unique_ptr<net::CookieStore> system_cookie_store; | |
191 #if BUILDFLAG(ENABLE_EXTENSIONS) | 182 #if BUILDFLAG(ENABLE_EXTENSIONS) |
192 scoped_refptr<extensions::EventRouterForwarder> | 183 scoped_refptr<extensions::EventRouterForwarder> |
193 extension_event_router_forwarder; | 184 extension_event_router_forwarder; |
194 #endif | 185 #endif |
195 std::unique_ptr<net::HostMappingRules> host_mapping_rules; | 186 std::unique_ptr<net::HostMappingRules> host_mapping_rules; |
196 std::unique_ptr<net::HttpUserAgentSettings> http_user_agent_settings; | 187 std::unique_ptr<net::HttpUserAgentSettings> http_user_agent_settings; |
197 std::unique_ptr<net::NetworkQualityEstimator> network_quality_estimator; | 188 std::unique_ptr<net::NetworkQualityEstimator> network_quality_estimator; |
198 std::unique_ptr< | 189 std::unique_ptr< |
199 net::NetworkQualityEstimator::RTTAndThroughputEstimatesObserver> | 190 net::NetworkQualityEstimator::RTTAndThroughputEstimatesObserver> |
200 network_quality_observer; | 191 network_quality_observer; |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 void UpdateNegotiateDisableCnameLookup(); | 286 void UpdateNegotiateDisableCnameLookup(); |
296 void UpdateNegotiateEnablePort(); | 287 void UpdateNegotiateEnablePort(); |
297 | 288 |
298 extensions::EventRouterForwarder* extension_event_router_forwarder() { | 289 extensions::EventRouterForwarder* extension_event_router_forwarder() { |
299 #if BUILDFLAG(ENABLE_EXTENSIONS) | 290 #if BUILDFLAG(ENABLE_EXTENSIONS) |
300 return extension_event_router_forwarder_; | 291 return extension_event_router_forwarder_; |
301 #else | 292 #else |
302 return NULL; | 293 return NULL; |
303 #endif | 294 #endif |
304 } | 295 } |
305 static net::URLRequestContext* ConstructSystemRequestContext( | 296 void ConstructSystemRequestContext(); |
306 IOThread::Globals* globals, | |
307 const net::HttpNetworkSession::Params& params, | |
308 net::NetLog* net_log); | |
309 | 297 |
310 // Parse command line flags and use components/network_session_configurator to | 298 // Parse command line flags and use components/network_session_configurator to |
311 // configure |params|. | 299 // configure |params|. |
312 static void ConfigureParamsFromFieldTrialsAndCommandLine( | 300 static void ConfigureParamsFromFieldTrialsAndCommandLine( |
313 const base::CommandLine& command_line, | 301 const base::CommandLine& command_line, |
314 bool is_quic_allowed_by_policy, | 302 bool is_quic_allowed_by_policy, |
315 bool http_09_on_non_default_ports_enabled, | 303 bool http_09_on_non_default_ports_enabled, |
316 net::HttpNetworkSession::Params* params); | 304 net::HttpNetworkSession::Params* params); |
317 | 305 |
318 // TODO(willchan): Remove proxy script fetcher context since it's not | 306 // TODO(willchan): Remove proxy script fetcher context since it's not |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 bool http_09_on_non_default_ports_enabled_; | 390 bool http_09_on_non_default_ports_enabled_; |
403 | 391 |
404 const base::TimeTicks creation_time_; | 392 const base::TimeTicks creation_time_; |
405 | 393 |
406 base::WeakPtrFactory<IOThread> weak_factory_; | 394 base::WeakPtrFactory<IOThread> weak_factory_; |
407 | 395 |
408 DISALLOW_COPY_AND_ASSIGN(IOThread); | 396 DISALLOW_COPY_AND_ASSIGN(IOThread); |
409 }; | 397 }; |
410 | 398 |
411 #endif // CHROME_BROWSER_IO_THREAD_H_ | 399 #endif // CHROME_BROWSER_IO_THREAD_H_ |
OLD | NEW |