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 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
15 #include "base/prefs/public/pref_member.h" | 15 #include "base/prefs/public/pref_member.h" |
16 #include "chrome/browser/net/ssl_config_service_manager.h" | 16 #include "chrome/browser/net/ssl_config_service_manager.h" |
17 #include "content/public/browser/browser_thread.h" | 17 #include "content/public/browser/browser_thread.h" |
18 #include "content/public/browser/browser_thread_delegate.h" | 18 #include "content/public/browser/browser_thread_delegate.h" |
19 #include "net/base/network_change_notifier.h" | 19 #include "net/base/network_change_notifier.h" |
20 #include "net/http/http_network_session.h" | 20 #include "net/http/http_network_session.h" |
21 #include "net/socket/next_proto.h" | 21 #include "net/socket/next_proto.h" |
22 | 22 |
23 class ChromeNetLog; | 23 class ChromeNetLog; |
24 class CommandLine; | 24 class CommandLine; |
25 class PrefProxyConfigTrackerImpl; | 25 class PrefProxyConfigTrackerImpl; |
26 class PrefService; | 26 class PrefService; |
27 class PrefServiceSimple; | 27 class PrefRegistrySimple; |
28 class SystemURLRequestContextGetter; | 28 class SystemURLRequestContextGetter; |
29 | 29 |
30 namespace chrome_browser_net { | 30 namespace chrome_browser_net { |
31 class DnsProbeService; | 31 class DnsProbeService; |
32 class HttpPipeliningCompatibilityClient; | 32 class HttpPipeliningCompatibilityClient; |
33 class LoadTimeStats; | 33 class LoadTimeStats; |
34 } | 34 } |
35 | 35 |
36 namespace extensions { | 36 namespace extensions { |
37 class EventRouterForwarder; | 37 class EventRouterForwarder; |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 Optional<uint16> origin_port_to_force_quic_on; | 164 Optional<uint16> origin_port_to_force_quic_on; |
165 Optional<bool> use_spdy_over_quic; | 165 Optional<bool> use_spdy_over_quic; |
166 bool enable_user_alternate_protocol_ports; | 166 bool enable_user_alternate_protocol_ports; |
167 // NetErrorTabHelper uses |dns_probe_service| to send DNS probes when a | 167 // NetErrorTabHelper uses |dns_probe_service| to send DNS probes when a |
168 // main frame load fails with a DNS error in order to provide more useful | 168 // main frame load fails with a DNS error in order to provide more useful |
169 // information to the renderer so it can show a more specific error page. | 169 // information to the renderer so it can show a more specific error page. |
170 scoped_ptr<chrome_browser_net::DnsProbeService> dns_probe_service; | 170 scoped_ptr<chrome_browser_net::DnsProbeService> dns_probe_service; |
171 }; | 171 }; |
172 | 172 |
173 // |net_log| must either outlive the IOThread or be NULL. | 173 // |net_log| must either outlive the IOThread or be NULL. |
174 IOThread(PrefServiceSimple* local_state, | 174 IOThread(PrefService* local_state, |
175 policy::PolicyService* policy_service, | 175 policy::PolicyService* policy_service, |
176 ChromeNetLog* net_log, | 176 ChromeNetLog* net_log, |
177 extensions::EventRouterForwarder* extension_event_router_forwarder); | 177 extensions::EventRouterForwarder* extension_event_router_forwarder); |
178 | 178 |
179 virtual ~IOThread(); | 179 virtual ~IOThread(); |
180 | 180 |
181 // Can only be called on the IO thread. | 181 // Can only be called on the IO thread. |
182 Globals* globals(); | 182 Globals* globals(); |
183 | 183 |
184 ChromeNetLog* net_log(); | 184 ChromeNetLog* net_log(); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 // Global state must be initialized on the IO thread, then this | 229 // Global state must be initialized on the IO thread, then this |
230 // method must be invoked on the UI thread. | 230 // method must be invoked on the UI thread. |
231 void InitSystemRequestContext(); | 231 void InitSystemRequestContext(); |
232 | 232 |
233 // Lazy initialization of system request context for | 233 // Lazy initialization of system request context for |
234 // SystemURLRequestContextGetter. To be called on IO thread only | 234 // SystemURLRequestContextGetter. To be called on IO thread only |
235 // after global state has been initialized on the IO thread, and | 235 // after global state has been initialized on the IO thread, and |
236 // SystemRequestContext state has been initialized on the UI thread. | 236 // SystemRequestContext state has been initialized on the UI thread. |
237 void InitSystemRequestContextOnIOThread(); | 237 void InitSystemRequestContextOnIOThread(); |
238 | 238 |
239 static void RegisterPrefs(PrefServiceSimple* local_state); | 239 static void RegisterPrefs(PrefRegistrySimple* registry); |
240 | 240 |
241 net::HttpAuthHandlerFactory* CreateDefaultAuthHandlerFactory( | 241 net::HttpAuthHandlerFactory* CreateDefaultAuthHandlerFactory( |
242 net::HostResolver* resolver); | 242 net::HostResolver* resolver); |
243 | 243 |
244 // Returns an SSLConfigService instance. | 244 // Returns an SSLConfigService instance. |
245 net::SSLConfigService* GetSSLConfigService(); | 245 net::SSLConfigService* GetSSLConfigService(); |
246 | 246 |
247 void ChangedToOnTheRecordOnIOThread(); | 247 void ChangedToOnTheRecordOnIOThread(); |
248 | 248 |
249 void UpdateDnsClientEnabled(); | 249 void UpdateDnsClientEnabled(); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 | 300 |
301 // True if SPDY is disabled by policy. | 301 // True if SPDY is disabled by policy. |
302 bool is_spdy_disabled_by_policy_; | 302 bool is_spdy_disabled_by_policy_; |
303 | 303 |
304 base::WeakPtrFactory<IOThread> weak_factory_; | 304 base::WeakPtrFactory<IOThread> weak_factory_; |
305 | 305 |
306 DISALLOW_COPY_AND_ASSIGN(IOThread); | 306 DISALLOW_COPY_AND_ASSIGN(IOThread); |
307 }; | 307 }; |
308 | 308 |
309 #endif // CHROME_BROWSER_IO_THREAD_H_ | 309 #endif // CHROME_BROWSER_IO_THREAD_H_ |
OLD | NEW |