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

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

Issue 2860033003: Don't delay creation of system URLRequestContext until first use (Closed)
Patch Set: Remove comment 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
« no previous file with comments | « no previous file | chrome/browser/io_thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 19 matching lines...) Expand all
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 #include "net/nqe/network_quality_estimator.h" 35 #include "net/nqe/network_quality_estimator.h"
36 36
37 class PrefProxyConfigTracker; 37 class PrefProxyConfigTracker;
38 class PrefService; 38 class PrefService;
39 class PrefRegistrySimple; 39 class PrefRegistrySimple;
40 class SystemURLRequestContextGetter;
41 40
42 #if defined(OS_ANDROID) 41 #if defined(OS_ANDROID)
43 namespace chrome { 42 namespace chrome {
44 namespace android { 43 namespace android {
45 class ExternalDataUseObserver; 44 class ExternalDataUseObserver;
46 } 45 }
47 } 46 }
48 #endif // defined(OS_ANDROID) 47 #endif // defined(OS_ANDROID)
49 48
50 namespace base { 49 namespace base {
51 class CommandLine; 50 class CommandLine;
52 } 51 }
53 52
54 namespace certificate_transparency { 53 namespace certificate_transparency {
55 class TreeStateTracker; 54 class TreeStateTracker;
56 } 55 }
57 56
57 namespace chrome {
58 class TestingIOThreadState;
59 }
60
58 namespace chrome_browser_net { 61 namespace chrome_browser_net {
59 class DnsProbeService; 62 class DnsProbeService;
60 } 63 }
61 64
62 namespace data_usage { 65 namespace data_usage {
63 class DataUseAggregator; 66 class DataUseAggregator;
64 } 67 }
65 68
66 namespace data_use_measurement { 69 namespace data_use_measurement {
67 class ChromeDataUseAscriber; 70 class ChromeDataUseAscriber;
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 // preferences/policy/commandline. 265 // preferences/policy/commandline.
263 // 266 //
264 // For a description of what these features are, and how they are 267 // For a description of what these features are, and how they are
265 // configured, see the comments in pref_names.cc for 268 // configured, see the comments in pref_names.cc for
266 // |kQuickCheckEnabled| and |kPacHttpsUrlStrippingEnabled 269 // |kQuickCheckEnabled| and |kPacHttpsUrlStrippingEnabled
267 // respectively. 270 // respectively.
268 bool WpadQuickCheckEnabled() const; 271 bool WpadQuickCheckEnabled() const;
269 bool PacHttpsUrlStrippingEnabled() const; 272 bool PacHttpsUrlStrippingEnabled() const;
270 273
271 private: 274 private:
272 // Provide SystemURLRequestContextGetter with access to
273 // InitSystemRequestContext().
274 friend class SystemURLRequestContextGetter;
275
276 friend class test::IOThreadPeer; 275 friend class test::IOThreadPeer;
276 friend class chrome::TestingIOThreadState;
277 277
278 // BrowserThreadDelegate implementation, runs on the IO thread. 278 // BrowserThreadDelegate implementation, runs on the IO thread.
279 // This handles initialization and destruction of state that must 279 // This handles initialization and destruction of state that must
280 // live on the IO thread. 280 // live on the IO thread.
281 void Init() override; 281 void Init() override;
282 void CleanUp() override; 282 void CleanUp() override;
283 283
284 // Global state must be initialized on the IO thread, then this
285 // method must be invoked on the UI thread.
286 void InitSystemRequestContext();
287
288 // Lazy initialization of system request context for
289 // SystemURLRequestContextGetter. To be called on IO thread only
290 // after global state has been initialized on the IO thread, and
291 // SystemRequestContext state has been initialized on the UI thread.
292 void InitSystemRequestContextOnIOThread();
293
294 void CreateDefaultAuthHandlerFactory(); 284 void CreateDefaultAuthHandlerFactory();
295 285
296 // Returns an SSLConfigService instance. 286 // Returns an SSLConfigService instance.
297 net::SSLConfigService* GetSSLConfigService(); 287 net::SSLConfigService* GetSSLConfigService();
298 288
299 void ChangedToOnTheRecordOnIOThread(); 289 void ChangedToOnTheRecordOnIOThread();
300 290
301 void UpdateDnsClientEnabled(); 291 void UpdateDnsClientEnabled();
302 void UpdateServerWhitelist(); 292 void UpdateServerWhitelist();
303 void UpdateDelegateWhitelist(); 293 void UpdateDelegateWhitelist();
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 bool http_09_on_non_default_ports_enabled_; 402 bool http_09_on_non_default_ports_enabled_;
413 403
414 const base::TimeTicks creation_time_; 404 const base::TimeTicks creation_time_;
415 405
416 base::WeakPtrFactory<IOThread> weak_factory_; 406 base::WeakPtrFactory<IOThread> weak_factory_;
417 407
418 DISALLOW_COPY_AND_ASSIGN(IOThread); 408 DISALLOW_COPY_AND_ASSIGN(IOThread);
419 }; 409 };
420 410
421 #endif // CHROME_BROWSER_IO_THREAD_H_ 411 #endif // CHROME_BROWSER_IO_THREAD_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/io_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698