| 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 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 ChromeNetLog* net_log, | 180 ChromeNetLog* net_log, |
| 181 extensions::EventRouterForwarder* extension_event_router_forwarder); | 181 extensions::EventRouterForwarder* extension_event_router_forwarder); |
| 182 | 182 |
| 183 virtual ~IOThread(); | 183 virtual ~IOThread(); |
| 184 | 184 |
| 185 static void RegisterPrefs(PrefRegistrySimple* registry); | 185 static void RegisterPrefs(PrefRegistrySimple* registry); |
| 186 | 186 |
| 187 // Can only be called on the IO thread. | 187 // Can only be called on the IO thread. |
| 188 Globals* globals(); | 188 Globals* globals(); |
| 189 | 189 |
| 190 // Allows overriding Globals in tests where IOThread::Init() and |
| 191 // IOThread::CleanUp() are not called. This allows for injecting mocks into |
| 192 // IOThread global objects. |
| 193 void SetGlobalsForTesting(Globals* globals); |
| 194 |
| 190 ChromeNetLog* net_log(); | 195 ChromeNetLog* net_log(); |
| 191 | 196 |
| 192 // Handles changing to On The Record mode, discarding confidential data. | 197 // Handles changing to On The Record mode, discarding confidential data. |
| 193 void ChangedToOnTheRecord(); | 198 void ChangedToOnTheRecord(); |
| 194 | 199 |
| 195 // Returns a getter for the URLRequestContext. Only called on the UI thread. | 200 // Returns a getter for the URLRequestContext. Only called on the UI thread. |
| 196 net::URLRequestContextGetter* system_url_request_context_getter(); | 201 net::URLRequestContextGetter* system_url_request_context_getter(); |
| 197 | 202 |
| 198 // Clears the host cache. Intended to be used to prevent exposing recently | 203 // Clears the host cache. Intended to be used to prevent exposing recently |
| 199 // visited sites on about:net-internals/#dns and about:dns pages. Must be | 204 // visited sites on about:net-internals/#dns and about:dns pages. Must be |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 | 314 |
| 310 // True if SPDY is disabled by policy. | 315 // True if SPDY is disabled by policy. |
| 311 bool is_spdy_disabled_by_policy_; | 316 bool is_spdy_disabled_by_policy_; |
| 312 | 317 |
| 313 base::WeakPtrFactory<IOThread> weak_factory_; | 318 base::WeakPtrFactory<IOThread> weak_factory_; |
| 314 | 319 |
| 315 DISALLOW_COPY_AND_ASSIGN(IOThread); | 320 DISALLOW_COPY_AND_ASSIGN(IOThread); |
| 316 }; | 321 }; |
| 317 | 322 |
| 318 #endif // CHROME_BROWSER_IO_THREAD_H_ | 323 #endif // CHROME_BROWSER_IO_THREAD_H_ |
| OLD | NEW |