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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 class SystemURLRequestContextGetter; | 30 class SystemURLRequestContextGetter; |
31 | 31 |
32 namespace base { | 32 namespace base { |
33 class CommandLine; | 33 class CommandLine; |
34 } | 34 } |
35 | 35 |
36 namespace chrome_browser_net { | 36 namespace chrome_browser_net { |
37 class DnsProbeService; | 37 class DnsProbeService; |
38 } | 38 } |
39 | 39 |
40 #if defined(SPDY_PROXY_AUTH_ORIGIN) | |
41 namespace data_reduction_proxy { | 40 namespace data_reduction_proxy { |
42 class DataReductionProxyAuthRequestHandler; | 41 class DataReductionProxyAuthRequestHandler; |
43 class DataReductionProxyParams; | 42 class DataReductionProxyParams; |
44 } | 43 } |
45 #endif // defined(SPDY_PROXY_AUTH_ORIGIN) | |
46 | 44 |
47 namespace extensions { | 45 namespace extensions { |
48 class EventRouterForwarder; | 46 class EventRouterForwarder; |
49 } | 47 } |
50 | 48 |
51 namespace net { | 49 namespace net { |
52 class CertVerifier; | 50 class CertVerifier; |
53 class ChannelIDService; | 51 class ChannelIDService; |
54 class CookieStore; | 52 class CookieStore; |
55 class CTVerifier; | 53 class CTVerifier; |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 Optional<size_t> quic_max_packet_length; | 188 Optional<size_t> quic_max_packet_length; |
191 net::QuicTagVector quic_connection_options; | 189 net::QuicTagVector quic_connection_options; |
192 Optional<std::string> quic_user_agent_id; | 190 Optional<std::string> quic_user_agent_id; |
193 Optional<net::QuicVersionVector> quic_supported_versions; | 191 Optional<net::QuicVersionVector> quic_supported_versions; |
194 Optional<net::HostPortPair> origin_to_force_quic_on; | 192 Optional<net::HostPortPair> origin_to_force_quic_on; |
195 bool enable_user_alternate_protocol_ports; | 193 bool enable_user_alternate_protocol_ports; |
196 // NetErrorTabHelper uses |dns_probe_service| to send DNS probes when a | 194 // NetErrorTabHelper uses |dns_probe_service| to send DNS probes when a |
197 // main frame load fails with a DNS error in order to provide more useful | 195 // main frame load fails with a DNS error in order to provide more useful |
198 // information to the renderer so it can show a more specific error page. | 196 // information to the renderer so it can show a more specific error page. |
199 scoped_ptr<chrome_browser_net::DnsProbeService> dns_probe_service; | 197 scoped_ptr<chrome_browser_net::DnsProbeService> dns_probe_service; |
200 #if defined(SPDY_PROXY_AUTH_ORIGIN) | |
201 scoped_ptr<data_reduction_proxy::DataReductionProxyParams> | 198 scoped_ptr<data_reduction_proxy::DataReductionProxyParams> |
202 data_reduction_proxy_params; | 199 data_reduction_proxy_params; |
203 scoped_ptr<data_reduction_proxy::DataReductionProxyAuthRequestHandler> | 200 scoped_ptr<data_reduction_proxy::DataReductionProxyAuthRequestHandler> |
204 data_reduction_proxy_auth_request_handler; | 201 data_reduction_proxy_auth_request_handler; |
205 #endif | |
206 }; | 202 }; |
207 | 203 |
208 // |net_log| must either outlive the IOThread or be NULL. | 204 // |net_log| must either outlive the IOThread or be NULL. |
209 IOThread(PrefService* local_state, | 205 IOThread(PrefService* local_state, |
210 policy::PolicyService* policy_service, | 206 policy::PolicyService* policy_service, |
211 ChromeNetLog* net_log, | 207 ChromeNetLog* net_log, |
212 extensions::EventRouterForwarder* extension_event_router_forwarder); | 208 extensions::EventRouterForwarder* extension_event_router_forwarder); |
213 | 209 |
214 virtual ~IOThread(); | 210 virtual ~IOThread(); |
215 | 211 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 net::SSLConfigService* GetSSLConfigService(); | 299 net::SSLConfigService* GetSSLConfigService(); |
304 | 300 |
305 void ChangedToOnTheRecordOnIOThread(); | 301 void ChangedToOnTheRecordOnIOThread(); |
306 | 302 |
307 void UpdateDnsClientEnabled(); | 303 void UpdateDnsClientEnabled(); |
308 | 304 |
309 // Configures QUIC options based on the flags in |command_line| as | 305 // Configures QUIC options based on the flags in |command_line| as |
310 // well as the QUIC field trial group. | 306 // well as the QUIC field trial group. |
311 void ConfigureQuic(const base::CommandLine& command_line); | 307 void ConfigureQuic(const base::CommandLine& command_line); |
312 | 308 |
| 309 // Set up data reduction proxy related objects on IO thread globals. |
| 310 void SetupDataReductionProxy(ChromeNetworkDelegate* network_delegate); |
| 311 |
313 extensions::EventRouterForwarder* extension_event_router_forwarder() { | 312 extensions::EventRouterForwarder* extension_event_router_forwarder() { |
314 #if defined(ENABLE_EXTENSIONS) | 313 #if defined(ENABLE_EXTENSIONS) |
315 return extension_event_router_forwarder_; | 314 return extension_event_router_forwarder_; |
316 #else | 315 #else |
317 return NULL; | 316 return NULL; |
318 #endif | 317 #endif |
319 } | 318 } |
320 // Configures QUIC options in |globals| based on the flags in |command_line| | 319 // Configures QUIC options in |globals| based on the flags in |command_line| |
321 // as well as the QUIC field trial group and parameters. | 320 // as well as the QUIC field trial group and parameters. |
322 static void ConfigureQuicGlobals( | 321 static void ConfigureQuicGlobals( |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 bool is_spdy_disabled_by_policy_; | 441 bool is_spdy_disabled_by_policy_; |
443 | 442 |
444 base::WeakPtrFactory<IOThread> weak_factory_; | 443 base::WeakPtrFactory<IOThread> weak_factory_; |
445 | 444 |
446 const base::TimeTicks creation_time_; | 445 const base::TimeTicks creation_time_; |
447 | 446 |
448 DISALLOW_COPY_AND_ASSIGN(IOThread); | 447 DISALLOW_COPY_AND_ASSIGN(IOThread); |
449 }; | 448 }; |
450 | 449 |
451 #endif // CHROME_BROWSER_IO_THREAD_H_ | 450 #endif // CHROME_BROWSER_IO_THREAD_H_ |
OLD | NEW |