| 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 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 scoped_ptr<data_reduction_proxy::DataReductionProxyDelegate> | 206 scoped_ptr<data_reduction_proxy::DataReductionProxyDelegate> |
| 207 data_reduction_proxy_delegate; | 207 data_reduction_proxy_delegate; |
| 208 }; | 208 }; |
| 209 | 209 |
| 210 // |net_log| must either outlive the IOThread or be NULL. | 210 // |net_log| must either outlive the IOThread or be NULL. |
| 211 IOThread(PrefService* local_state, | 211 IOThread(PrefService* local_state, |
| 212 policy::PolicyService* policy_service, | 212 policy::PolicyService* policy_service, |
| 213 ChromeNetLog* net_log, | 213 ChromeNetLog* net_log, |
| 214 extensions::EventRouterForwarder* extension_event_router_forwarder); | 214 extensions::EventRouterForwarder* extension_event_router_forwarder); |
| 215 | 215 |
| 216 virtual ~IOThread(); | 216 ~IOThread() override; |
| 217 | 217 |
| 218 static void RegisterPrefs(PrefRegistrySimple* registry); | 218 static void RegisterPrefs(PrefRegistrySimple* registry); |
| 219 | 219 |
| 220 // Can only be called on the IO thread. | 220 // Can only be called on the IO thread. |
| 221 Globals* globals(); | 221 Globals* globals(); |
| 222 | 222 |
| 223 // Allows overriding Globals in tests where IOThread::Init() and | 223 // Allows overriding Globals in tests where IOThread::Init() and |
| 224 // IOThread::CleanUp() are not called. This allows for injecting mocks into | 224 // IOThread::CleanUp() are not called. This allows for injecting mocks into |
| 225 // IOThread global objects. | 225 // IOThread global objects. |
| 226 void SetGlobalsForTesting(Globals* globals); | 226 void SetGlobalsForTesting(Globals* globals); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 248 | 248 |
| 249 // Provide SystemURLRequestContextGetter with access to | 249 // Provide SystemURLRequestContextGetter with access to |
| 250 // InitSystemRequestContext(). | 250 // InitSystemRequestContext(). |
| 251 friend class SystemURLRequestContextGetter; | 251 friend class SystemURLRequestContextGetter; |
| 252 | 252 |
| 253 friend class test::IOThreadPeer; | 253 friend class test::IOThreadPeer; |
| 254 | 254 |
| 255 // BrowserThreadDelegate implementation, runs on the IO thread. | 255 // BrowserThreadDelegate implementation, runs on the IO thread. |
| 256 // This handles initialization and destruction of state that must | 256 // This handles initialization and destruction of state that must |
| 257 // live on the IO thread. | 257 // live on the IO thread. |
| 258 virtual void Init() override; | 258 void Init() override; |
| 259 virtual void InitAsync() override; | 259 void InitAsync() override; |
| 260 virtual void CleanUp() override; | 260 void CleanUp() override; |
| 261 | 261 |
| 262 // Initializes |params| based on the settings in |globals|. | 262 // Initializes |params| based on the settings in |globals|. |
| 263 static void InitializeNetworkSessionParamsFromGlobals( | 263 static void InitializeNetworkSessionParamsFromGlobals( |
| 264 const Globals& globals, | 264 const Globals& globals, |
| 265 net::HttpNetworkSession::Params* params); | 265 net::HttpNetworkSession::Params* params); |
| 266 | 266 |
| 267 void InitializeNetworkOptions(const base::CommandLine& parsed_command_line); | 267 void InitializeNetworkOptions(const base::CommandLine& parsed_command_line); |
| 268 | 268 |
| 269 // Sets up TCP FastOpen if enabled via field trials or via the command line. | 269 // Sets up TCP FastOpen if enabled via field trials or via the command line. |
| 270 void ConfigureTCPFastOpen(const base::CommandLine& command_line); | 270 void ConfigureTCPFastOpen(const base::CommandLine& command_line); |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 bool is_spdy_disabled_by_policy_; | 452 bool is_spdy_disabled_by_policy_; |
| 453 | 453 |
| 454 const base::TimeTicks creation_time_; | 454 const base::TimeTicks creation_time_; |
| 455 | 455 |
| 456 base::WeakPtrFactory<IOThread> weak_factory_; | 456 base::WeakPtrFactory<IOThread> weak_factory_; |
| 457 | 457 |
| 458 DISALLOW_COPY_AND_ASSIGN(IOThread); | 458 DISALLOW_COPY_AND_ASSIGN(IOThread); |
| 459 }; | 459 }; |
| 460 | 460 |
| 461 #endif // CHROME_BROWSER_IO_THREAD_H_ | 461 #endif // CHROME_BROWSER_IO_THREAD_H_ |
| OLD | NEW |