Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(483)

Side by Side Diff: chrome/browser/io_thread.h

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ready for review. Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 PrefServiceSimple;
27 class SystemURLRequestContextGetter; 27 class SystemURLRequestContextGetter;
28 28
29 namespace chrome_browser_net { 29 namespace chrome_browser_net {
30 class DnsProbeService; 30 class DnsProbeService;
31 class HttpPipeliningCompatibilityClient; 31 class HttpPipeliningCompatibilityClient;
32 class LoadTimeStats; 32 class LoadTimeStats;
33 } 33 }
34 34
35 namespace extensions { 35 namespace extensions {
36 class EventRouterForwarder; 36 class EventRouterForwarder;
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 Optional<bool> enable_spdy_ping_based_connection_checking; 159 Optional<bool> enable_spdy_ping_based_connection_checking;
160 Optional<net::NextProto> spdy_default_protocol; 160 Optional<net::NextProto> spdy_default_protocol;
161 Optional<uint16> origin_port_to_force_quic_on; 161 Optional<uint16> origin_port_to_force_quic_on;
162 // NetErrorTabHelper uses |dns_probe_service| to send DNS probes when a 162 // NetErrorTabHelper uses |dns_probe_service| to send DNS probes when a
163 // main frame load fails with a DNS error in order to provide more useful 163 // main frame load fails with a DNS error in order to provide more useful
164 // information to the renderer so it can show a more specific error page. 164 // information to the renderer so it can show a more specific error page.
165 scoped_ptr<chrome_browser_net::DnsProbeService> dns_probe_service; 165 scoped_ptr<chrome_browser_net::DnsProbeService> dns_probe_service;
166 }; 166 };
167 167
168 // |net_log| must either outlive the IOThread or be NULL. 168 // |net_log| must either outlive the IOThread or be NULL.
169 IOThread(PrefService* local_state, 169 IOThread(PrefServiceSimple* local_state,
Mattias Nissler (ping if slow) 2012/12/20 13:41:52 Can we pass PrefServiceBase* here?
Jói 2012/12/20 16:30:31 Unfortunately, not right now, because the construc
170 policy::PolicyService* policy_service, 170 policy::PolicyService* policy_service,
171 ChromeNetLog* net_log, 171 ChromeNetLog* net_log,
172 extensions::EventRouterForwarder* extension_event_router_forwarder); 172 extensions::EventRouterForwarder* extension_event_router_forwarder);
173 173
174 virtual ~IOThread(); 174 virtual ~IOThread();
175 175
176 // Can only be called on the IO thread. 176 // Can only be called on the IO thread.
177 Globals* globals(); 177 Globals* globals();
178 178
179 ChromeNetLog* net_log(); 179 ChromeNetLog* net_log();
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 // Global state must be initialized on the IO thread, then this 224 // Global state must be initialized on the IO thread, then this
225 // method must be invoked on the UI thread. 225 // method must be invoked on the UI thread.
226 void InitSystemRequestContext(); 226 void InitSystemRequestContext();
227 227
228 // Lazy initialization of system request context for 228 // Lazy initialization of system request context for
229 // SystemURLRequestContextGetter. To be called on IO thread only 229 // SystemURLRequestContextGetter. To be called on IO thread only
230 // after global state has been initialized on the IO thread, and 230 // after global state has been initialized on the IO thread, and
231 // SystemRequestContext state has been initialized on the UI thread. 231 // SystemRequestContext state has been initialized on the UI thread.
232 void InitSystemRequestContextOnIOThread(); 232 void InitSystemRequestContextOnIOThread();
233 233
234 static void RegisterPrefs(PrefService* local_state); 234 static void RegisterPrefs(PrefServiceSimple* local_state);
235 235
236 net::HttpAuthHandlerFactory* CreateDefaultAuthHandlerFactory( 236 net::HttpAuthHandlerFactory* CreateDefaultAuthHandlerFactory(
237 net::HostResolver* resolver); 237 net::HostResolver* resolver);
238 238
239 // Returns an SSLConfigService instance. 239 // Returns an SSLConfigService instance.
240 net::SSLConfigService* GetSSLConfigService(); 240 net::SSLConfigService* GetSSLConfigService();
241 241
242 void ChangedToOnTheRecordOnIOThread(); 242 void ChangedToOnTheRecordOnIOThread();
243 243
244 void UpdateDnsClientEnabled(); 244 void UpdateDnsClientEnabled();
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 295
296 // True if SPDY is disabled by policy. 296 // True if SPDY is disabled by policy.
297 bool is_spdy_disabled_by_policy_; 297 bool is_spdy_disabled_by_policy_;
298 298
299 base::WeakPtrFactory<IOThread> weak_factory_; 299 base::WeakPtrFactory<IOThread> weak_factory_;
300 300
301 DISALLOW_COPY_AND_ASSIGN(IOThread); 301 DISALLOW_COPY_AND_ASSIGN(IOThread);
302 }; 302 };
303 303
304 #endif // CHROME_BROWSER_IO_THREAD_H_ 304 #endif // CHROME_BROWSER_IO_THREAD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698