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