Chromium Code Reviews| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 217 // Allows overriding Globals in tests where IOThread::Init() and | 217 // Allows overriding Globals in tests where IOThread::Init() and |
| 218 // IOThread::CleanUp() are not called. This allows for injecting mocks into | 218 // IOThread::CleanUp() are not called. This allows for injecting mocks into |
| 219 // IOThread global objects. | 219 // IOThread global objects. |
| 220 void SetGlobalsForTesting(Globals* globals); | 220 void SetGlobalsForTesting(Globals* globals); |
| 221 | 221 |
| 222 net_log::ChromeNetLog* net_log(); | 222 net_log::ChromeNetLog* net_log(); |
| 223 | 223 |
| 224 // Handles changing to On The Record mode, discarding confidential data. | 224 // Handles changing to On The Record mode, discarding confidential data. |
| 225 void ChangedToOnTheRecord(); | 225 void ChangedToOnTheRecord(); |
| 226 | 226 |
| 227 // Returns a getter for the URLRequestContext. Only called on the UI thread. | 227 // Returns a getter for the system URLRequestContext. Only called on the UI |
|
eroman
2017/02/22 02:03:29
Please propose refactors io_thread as a separate C
wangyix1
2017/02/23 02:14:57
Change reverted.
| |
| 228 // thread. | |
| 228 net::URLRequestContextGetter* system_url_request_context_getter(); | 229 net::URLRequestContextGetter* system_url_request_context_getter(); |
| 229 | 230 |
| 230 // Clears the host cache. Intended to be used to prevent exposing recently | 231 // Clears the host cache. Intended to be used to prevent exposing recently |
| 231 // visited sites on about:net-internals/#dns and about:dns pages. Must be | 232 // visited sites on about:net-internals/#dns and about:dns pages. Must be |
| 232 // called on the IO thread. If |host_filter| is not null, only hosts matched | 233 // called on the IO thread. If |host_filter| is not null, only hosts matched |
| 233 // by it are deleted from the cache. | 234 // by it are deleted from the cache. |
| 234 void ClearHostCache( | 235 void ClearHostCache( |
| 235 const base::Callback<bool(const std::string&)>& host_filter); | 236 const base::Callback<bool(const std::string&)>& host_filter); |
| 236 | 237 |
| 237 const net::HttpNetworkSession::Params& NetworkSessionParams() const; | 238 const net::HttpNetworkSession::Params& NetworkSessionParams() const; |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 404 bool http_09_on_non_default_ports_enabled_; | 405 bool http_09_on_non_default_ports_enabled_; |
| 405 | 406 |
| 406 const base::TimeTicks creation_time_; | 407 const base::TimeTicks creation_time_; |
| 407 | 408 |
| 408 base::WeakPtrFactory<IOThread> weak_factory_; | 409 base::WeakPtrFactory<IOThread> weak_factory_; |
| 409 | 410 |
| 410 DISALLOW_COPY_AND_ASSIGN(IOThread); | 411 DISALLOW_COPY_AND_ASSIGN(IOThread); |
| 411 }; | 412 }; |
| 412 | 413 |
| 413 #endif // CHROME_BROWSER_IO_THREAD_H_ | 414 #endif // CHROME_BROWSER_IO_THREAD_H_ |
| OLD | NEW |