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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 15 #include "chrome/browser/api/prefs/pref_member.h" | 15 #include "chrome/browser/api/prefs/pref_member.h" |
| 16 #include "chrome/browser/net/ssl_config_service_manager.h" | 16 #include "chrome/browser/net/ssl_config_service_manager.h" |
| 17 #include "content/public/browser/browser_thread.h" | 17 #include "content/public/browser/browser_thread.h" |
| 18 #include "content/public/browser/browser_thread_delegate.h" | 18 #include "content/public/browser/browser_thread_delegate.h" |
| 19 #include "net/base/network_change_notifier.h" | 19 #include "net/base/network_change_notifier.h" |
| 20 | 20 |
| 21 class ChromeNetLog; | 21 class ChromeNetLog; |
| 22 class ChromeProxyConfigService; | |
| 22 class PrefProxyConfigTrackerImpl; | 23 class PrefProxyConfigTrackerImpl; |
| 23 class PrefService; | 24 class PrefService; |
| 24 class SystemURLRequestContextGetter; | 25 class SystemURLRequestContextGetter; |
| 25 | 26 |
| 26 namespace chrome_browser_net { | 27 namespace chrome_browser_net { |
| 27 class HttpPipeliningCompatibilityClient; | 28 class HttpPipeliningCompatibilityClient; |
| 28 class LoadTimeStats; | 29 class LoadTimeStats; |
| 29 } | 30 } |
| 30 | 31 |
| 31 namespace extensions { | 32 namespace extensions { |
| 32 class EventRouterForwarder; | 33 class EventRouterForwarder; |
| 33 } | 34 } |
| 34 | 35 |
| 35 namespace net { | 36 namespace net { |
| 36 class CertVerifier; | 37 class CertVerifier; |
| 37 class CookieStore; | 38 class CookieStore; |
| 38 class FtpTransactionFactory; | 39 class FtpTransactionFactory; |
| 39 class HostMappingRules; | 40 class HostMappingRules; |
| 40 class HostResolver; | 41 class HostResolver; |
| 41 class HttpAuthHandlerFactory; | 42 class HttpAuthHandlerFactory; |
| 42 class HttpServerProperties; | 43 class HttpServerProperties; |
| 43 class HttpTransactionFactory; | 44 class HttpTransactionFactory; |
| 44 class NetworkDelegate; | 45 class NetworkDelegate; |
| 45 class ServerBoundCertService; | 46 class ServerBoundCertService; |
| 46 class ProxyConfigService; | |
| 47 class ProxyService; | 47 class ProxyService; |
| 48 class SdchManager; | 48 class SdchManager; |
| 49 class SSLConfigService; | 49 class SSLConfigService; |
| 50 class TransportSecurityState; | 50 class TransportSecurityState; |
| 51 class URLRequestContext; | 51 class URLRequestContext; |
| 52 class URLRequestContextGetter; | 52 class URLRequestContextGetter; |
| 53 class URLRequestThrottlerManager; | 53 class URLRequestThrottlerManager; |
| 54 class URLSecurityManager; | 54 class URLSecurityManager; |
| 55 } // namespace net | 55 } // namespace net |
| 56 | 56 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 137 void ChangedToOnTheRecord(); | 137 void ChangedToOnTheRecord(); |
| 138 | 138 |
| 139 // Returns a getter for the URLRequestContext. Only called on the UI thread. | 139 // Returns a getter for the URLRequestContext. Only called on the UI thread. |
| 140 net::URLRequestContextGetter* system_url_request_context_getter(); | 140 net::URLRequestContextGetter* system_url_request_context_getter(); |
| 141 | 141 |
| 142 // Clears the host cache. Intended to be used to prevent exposing recently | 142 // Clears the host cache. Intended to be used to prevent exposing recently |
| 143 // visited sites on about:net-internals/#dns and about:dns pages. Must be | 143 // visited sites on about:net-internals/#dns and about:dns pages. Must be |
| 144 // called on the IO thread. | 144 // called on the IO thread. |
| 145 void ClearHostCache(); | 145 void ClearHostCache(); |
| 146 | 146 |
| 147 // Called on the UI thread to indicate now is the time for shutdown work that | |
|
willchan no longer on Chromium
2012/10/19 18:06:36
Can you explain why this hook needs to exist? Why
pauljensen
2012/10/19 22:34:28
~IOThread() is called after every thread except th
| |
| 148 // must occur on the UI thread. Its also one of the last safe times to post | |
| 149 // shutdown tasks to other browser threads. | |
| 150 void StartTearDown(); | |
| 151 | |
| 147 private: | 152 private: |
| 148 // BrowserThreadDelegate implementation, runs on the IO thread. | 153 // BrowserThreadDelegate implementation, runs on the IO thread. |
| 149 // This handles initialization and destruction of state that must | 154 // This handles initialization and destruction of state that must |
| 150 // live on the IO thread. | 155 // live on the IO thread. |
| 151 virtual void Init() OVERRIDE; | 156 virtual void Init() OVERRIDE; |
| 152 virtual void CleanUp() OVERRIDE; | 157 virtual void CleanUp() OVERRIDE; |
| 153 | 158 |
| 154 // Provide SystemURLRequestContextGetter with access to | 159 // Provide SystemURLRequestContextGetter with access to |
| 155 // InitSystemRequestContext(). | 160 // InitSystemRequestContext(). |
| 156 friend class SystemURLRequestContextGetter; | 161 friend class SystemURLRequestContextGetter; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 205 bool negotiate_enable_port_; | 210 bool negotiate_enable_port_; |
| 206 std::string auth_server_whitelist_; | 211 std::string auth_server_whitelist_; |
| 207 std::string auth_delegate_whitelist_; | 212 std::string auth_delegate_whitelist_; |
| 208 std::string gssapi_library_name_; | 213 std::string gssapi_library_name_; |
| 209 std::string spdyproxy_origin_; | 214 std::string spdyproxy_origin_; |
| 210 | 215 |
| 211 // This is an instance of the default SSLConfigServiceManager for the current | 216 // This is an instance of the default SSLConfigServiceManager for the current |
| 212 // platform and it gets SSL preferences from local_state object. | 217 // platform and it gets SSL preferences from local_state object. |
| 213 scoped_ptr<SSLConfigServiceManager> ssl_config_service_manager_; | 218 scoped_ptr<SSLConfigServiceManager> ssl_config_service_manager_; |
| 214 | 219 |
| 215 // These member variables are initialized by a task posted to the IO thread, | 220 scoped_ptr<ChromeProxyConfigService> system_proxy_config_service_; |
| 216 // which gets posted by calling certain member functions of IOThread. | |
| 217 scoped_ptr<net::ProxyConfigService> system_proxy_config_service_; | |
| 218 | 221 |
| 219 scoped_ptr<PrefProxyConfigTrackerImpl> pref_proxy_config_tracker_; | 222 scoped_ptr<PrefProxyConfigTrackerImpl> pref_proxy_config_tracker_; |
| 220 | 223 |
| 224 // This member variable is initialized by a task posted to the IO thread, | |
| 225 // which gets posted by calling certain member functions of IOThread. | |
| 221 scoped_refptr<net::URLRequestContextGetter> | 226 scoped_refptr<net::URLRequestContextGetter> |
| 222 system_url_request_context_getter_; | 227 system_url_request_context_getter_; |
| 223 | 228 |
| 224 net::SdchManager* sdch_manager_; | 229 net::SdchManager* sdch_manager_; |
| 225 | 230 |
| 226 base::WeakPtrFactory<IOThread> weak_factory_; | 231 base::WeakPtrFactory<IOThread> weak_factory_; |
| 227 | 232 |
| 228 DISALLOW_COPY_AND_ASSIGN(IOThread); | 233 DISALLOW_COPY_AND_ASSIGN(IOThread); |
| 229 }; | 234 }; |
| 230 | 235 |
| 231 #endif // CHROME_BROWSER_IO_THREAD_H_ | 236 #endif // CHROME_BROWSER_IO_THREAD_H_ |
| OLD | NEW |