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 "chrome/browser/api/prefs/pref_member.h" | 15 #include "chrome/browser/api/prefs/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/socket/next_proto.h" | |
20 | 21 |
21 class ChromeNetLog; | 22 class ChromeNetLog; |
22 class CommandLine; | 23 class CommandLine; |
23 class PrefProxyConfigTrackerImpl; | 24 class PrefProxyConfigTrackerImpl; |
24 class PrefService; | 25 class PrefService; |
25 class SystemURLRequestContextGetter; | 26 class SystemURLRequestContextGetter; |
26 | 27 |
27 namespace chrome_browser_net { | 28 namespace chrome_browser_net { |
28 class DnsProbeService; | 29 class DnsProbeService; |
29 class HttpPipeliningCompatibilityClient; | 30 class HttpPipeliningCompatibilityClient; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
62 } // namespace policy | 63 } // namespace policy |
63 | 64 |
64 // Contains state associated with, initialized and cleaned up on, and | 65 // Contains state associated with, initialized and cleaned up on, and |
65 // primarily used on, the IO thread. | 66 // primarily used on, the IO thread. |
66 // | 67 // |
67 // If you are looking to interact with the IO thread (e.g. post tasks | 68 // If you are looking to interact with the IO thread (e.g. post tasks |
68 // to it or check if it is the current thread), see | 69 // to it or check if it is the current thread), see |
69 // content::BrowserThread. | 70 // content::BrowserThread. |
70 class IOThread : public content::BrowserThreadDelegate { | 71 class IOThread : public content::BrowserThreadDelegate { |
71 public: | 72 public: |
73 enum OptionalBoolean { | |
74 DEFAULT, | |
75 TRUE, | |
76 FALSE, | |
77 }; | |
Nico
2012/12/02 03:54:23
Ugh. Do we have an optional<> template somewhere?
Ryan Hamilton
2012/12/03 23:04:12
Done.
| |
72 struct Globals { | 78 struct Globals { |
73 class SystemRequestContextLeakChecker { | 79 class SystemRequestContextLeakChecker { |
74 public: | 80 public: |
75 explicit SystemRequestContextLeakChecker(Globals* globals); | 81 explicit SystemRequestContextLeakChecker(Globals* globals); |
76 ~SystemRequestContextLeakChecker(); | 82 ~SystemRequestContextLeakChecker(); |
77 | 83 |
78 private: | 84 private: |
79 Globals* const globals_; | 85 Globals* const globals_; |
80 }; | 86 }; |
81 | 87 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
120 extension_event_router_forwarder; | 126 extension_event_router_forwarder; |
121 scoped_ptr<chrome_browser_net::HttpPipeliningCompatibilityClient> | 127 scoped_ptr<chrome_browser_net::HttpPipeliningCompatibilityClient> |
122 http_pipelining_compatibility_client; | 128 http_pipelining_compatibility_client; |
123 scoped_ptr<chrome_browser_net::LoadTimeStats> load_time_stats; | 129 scoped_ptr<chrome_browser_net::LoadTimeStats> load_time_stats; |
124 scoped_ptr<net::HostMappingRules> host_mapping_rules; | 130 scoped_ptr<net::HostMappingRules> host_mapping_rules; |
125 scoped_ptr<net::HttpUserAgentSettings> http_user_agent_settings; | 131 scoped_ptr<net::HttpUserAgentSettings> http_user_agent_settings; |
126 bool ignore_certificate_errors; | 132 bool ignore_certificate_errors; |
127 bool http_pipelining_enabled; | 133 bool http_pipelining_enabled; |
128 uint16 testing_fixed_http_port; | 134 uint16 testing_fixed_http_port; |
129 uint16 testing_fixed_https_port; | 135 uint16 testing_fixed_https_port; |
136 int max_spdy_sessions_per_domain; | |
137 size_t initial_max_spdy_concurrent_streams; | |
138 size_t max_spdy_concurrent_streams_limit; | |
139 OptionalBoolean force_spdy_single_domain; | |
140 OptionalBoolean enable_spdy_ip_pooling; | |
141 OptionalBoolean enable_spdy_credential_frames; | |
142 OptionalBoolean enable_spdy_compression; | |
143 OptionalBoolean enable_spdy_ping_based_connection_checking; | |
144 net::NextProto spdy_default_protocol; | |
130 // NetErrorTabHelper uses |dns_probe_service| to send DNS probes when a | 145 // NetErrorTabHelper uses |dns_probe_service| to send DNS probes when a |
131 // main frame load fails with a DNS error in order to provide more useful | 146 // main frame load fails with a DNS error in order to provide more useful |
132 // information to the renderer so it can show a more specific error page. | 147 // information to the renderer so it can show a more specific error page. |
133 scoped_ptr<chrome_browser_net::DnsProbeService> dns_probe_service; | 148 scoped_ptr<chrome_browser_net::DnsProbeService> dns_probe_service; |
134 }; | 149 }; |
135 | 150 |
136 // |net_log| must either outlive the IOThread or be NULL. | 151 // |net_log| must either outlive the IOThread or be NULL. |
137 IOThread(PrefService* local_state, | 152 IOThread(PrefService* local_state, |
138 policy::PolicyService* policy_service, | 153 policy::PolicyService* policy_service, |
139 ChromeNetLog* net_log, | 154 ChromeNetLog* net_log, |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
261 | 276 |
262 // True if SPDY is disabled by policy. | 277 // True if SPDY is disabled by policy. |
263 bool is_spdy_disabled_by_policy_; | 278 bool is_spdy_disabled_by_policy_; |
264 | 279 |
265 base::WeakPtrFactory<IOThread> weak_factory_; | 280 base::WeakPtrFactory<IOThread> weak_factory_; |
266 | 281 |
267 DISALLOW_COPY_AND_ASSIGN(IOThread); | 282 DISALLOW_COPY_AND_ASSIGN(IOThread); |
268 }; | 283 }; |
269 | 284 |
270 #endif // CHROME_BROWSER_IO_THREAD_H_ | 285 #endif // CHROME_BROWSER_IO_THREAD_H_ |
OLD | NEW |