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

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

Issue 2860033003: Don't delay creation of system URLRequestContext until first use (Closed)
Patch Set: Fix android Created 3 years, 7 months 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
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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 18 matching lines...) Expand all
29 #include "components/ssl_config/ssl_config_service_manager.h" 29 #include "components/ssl_config/ssl_config_service_manager.h"
30 #include "content/public/browser/browser_thread.h" 30 #include "content/public/browser/browser_thread.h"
31 #include "content/public/browser/browser_thread_delegate.h" 31 #include "content/public/browser/browser_thread_delegate.h"
32 #include "extensions/features/features.h" 32 #include "extensions/features/features.h"
33 #include "net/base/network_change_notifier.h" 33 #include "net/base/network_change_notifier.h"
34 #include "net/http/http_network_session.h" 34 #include "net/http/http_network_session.h"
35 35
36 class PrefProxyConfigTracker; 36 class PrefProxyConfigTracker;
37 class PrefService; 37 class PrefService;
38 class PrefRegistrySimple; 38 class PrefRegistrySimple;
39 class SystemURLRequestContextGetter;
40 39
41 #if defined(OS_ANDROID) 40 #if defined(OS_ANDROID)
42 namespace chrome { 41 namespace chrome {
43 namespace android { 42 namespace android {
44 class ExternalDataUseObserver; 43 class ExternalDataUseObserver;
45 } 44 }
46 } 45 }
47 #endif // defined(OS_ANDROID) 46 #endif // defined(OS_ANDROID)
48 47
49 namespace base { 48 namespace base {
50 class CommandLine; 49 class CommandLine;
51 } 50 }
52 51
53 namespace certificate_transparency { 52 namespace certificate_transparency {
54 class TreeStateTracker; 53 class TreeStateTracker;
55 } 54 }
56 55
56 namespace chrome {
57 class TestingIOThreadState;
58 }
59
57 namespace chrome_browser_net { 60 namespace chrome_browser_net {
58 class DnsProbeService; 61 class DnsProbeService;
59 } 62 }
60 63
61 namespace data_usage { 64 namespace data_usage {
62 class DataUseAggregator; 65 class DataUseAggregator;
63 } 66 }
64 67
65 namespace data_use_measurement { 68 namespace data_use_measurement {
66 class ChromeDataUseAscriber; 69 class ChromeDataUseAscriber;
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 // preferences/policy/commandline. 261 // preferences/policy/commandline.
259 // 262 //
260 // For a description of what these features are, and how they are 263 // For a description of what these features are, and how they are
261 // configured, see the comments in pref_names.cc for 264 // configured, see the comments in pref_names.cc for
262 // |kQuickCheckEnabled| and |kPacHttpsUrlStrippingEnabled 265 // |kQuickCheckEnabled| and |kPacHttpsUrlStrippingEnabled
263 // respectively. 266 // respectively.
264 bool WpadQuickCheckEnabled() const; 267 bool WpadQuickCheckEnabled() const;
265 bool PacHttpsUrlStrippingEnabled() const; 268 bool PacHttpsUrlStrippingEnabled() const;
266 269
267 private: 270 private:
268 // Provide SystemURLRequestContextGetter with access to
269 // InitSystemRequestContext().
270 friend class SystemURLRequestContextGetter;
271
272 friend class test::IOThreadPeer; 271 friend class test::IOThreadPeer;
272 friend class chrome::TestingIOThreadState;
273 273
274 // BrowserThreadDelegate implementation, runs on the IO thread. 274 // BrowserThreadDelegate implementation, runs on the IO thread.
275 // This handles initialization and destruction of state that must 275 // This handles initialization and destruction of state that must
276 // live on the IO thread. 276 // live on the IO thread.
277 void Init() override; 277 void Init() override;
278 void CleanUp() override; 278 void CleanUp() override;
279 279
280 // Global state must be initialized on the IO thread, then this
281 // method must be invoked on the UI thread.
282 void InitSystemRequestContext();
283
284 // Lazy initialization of system request context for
285 // SystemURLRequestContextGetter. To be called on IO thread only
286 // after global state has been initialized on the IO thread, and
287 // SystemRequestContext state has been initialized on the UI thread.
288 void InitSystemRequestContextOnIOThread();
289
290 void CreateDefaultAuthHandlerFactory(); 280 void CreateDefaultAuthHandlerFactory();
291 281
292 // Returns an SSLConfigService instance. 282 // Returns an SSLConfigService instance.
293 net::SSLConfigService* GetSSLConfigService(); 283 net::SSLConfigService* GetSSLConfigService();
294 284
295 void ChangedToOnTheRecordOnIOThread(); 285 void ChangedToOnTheRecordOnIOThread();
296 286
297 void UpdateDnsClientEnabled(); 287 void UpdateDnsClientEnabled();
298 void UpdateServerWhitelist(); 288 void UpdateServerWhitelist();
299 void UpdateDelegateWhitelist(); 289 void UpdateDelegateWhitelist();
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 bool http_09_on_non_default_ports_enabled_; 394 bool http_09_on_non_default_ports_enabled_;
405 395
406 const base::TimeTicks creation_time_; 396 const base::TimeTicks creation_time_;
407 397
408 base::WeakPtrFactory<IOThread> weak_factory_; 398 base::WeakPtrFactory<IOThread> weak_factory_;
409 399
410 DISALLOW_COPY_AND_ASSIGN(IOThread); 400 DISALLOW_COPY_AND_ASSIGN(IOThread);
411 }; 401 };
412 402
413 #endif // CHROME_BROWSER_IO_THREAD_H_ 403 #endif // CHROME_BROWSER_IO_THREAD_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/io_thread.cc » ('j') | components/proxy_config/pref_proxy_config_tracker_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698