| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 class ProxyConfigService; | 40 class ProxyConfigService; |
| 41 class ProxyService; | 41 class ProxyService; |
| 42 class SdchManager; | 42 class SdchManager; |
| 43 class SSLConfigService; | 43 class SSLConfigService; |
| 44 class URLRequestContext; | 44 class URLRequestContext; |
| 45 class URLRequestContextGetter; | 45 class URLRequestContextGetter; |
| 46 class URLSecurityManager; | 46 class URLSecurityManager; |
| 47 } // namespace net | 47 } // namespace net |
| 48 | 48 |
| 49 // Contains state associated with, initialized and cleaned up on, and | 49 // Contains state associated with, initialized and cleaned up on, and |
| 50 // primarily used on, the IO thread. Also acts as a convenience | 50 // primarily used on, the IO thread. |
| 51 // accessor to the Thread object for the IO thread. | |
| 52 class IOThread : public content::BrowserThreadDelegate { | 51 class IOThread : public content::BrowserThreadDelegate { |
| 53 public: | 52 public: |
| 54 struct Globals { | 53 struct Globals { |
| 55 Globals(); | 54 Globals(); |
| 56 ~Globals(); | 55 ~Globals(); |
| 57 | 56 |
| 58 struct MediaGlobals { | 57 struct MediaGlobals { |
| 59 MediaGlobals(); | 58 MediaGlobals(); |
| 60 ~MediaGlobals(); | 59 ~MediaGlobals(); |
| 61 // MediaInternals singleton used to aggregate media information. | 60 // MediaInternals singleton used to aggregate media information. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 ChromeNetLog* net_log(); | 107 ChromeNetLog* net_log(); |
| 109 | 108 |
| 110 // Returns a getter for the URLRequestContext. Only called on the UI thread. | 109 // Returns a getter for the URLRequestContext. Only called on the UI thread. |
| 111 net::URLRequestContextGetter* system_url_request_context_getter(); | 110 net::URLRequestContextGetter* system_url_request_context_getter(); |
| 112 | 111 |
| 113 // Clears the host cache. Intended to be used to prevent exposing recently | 112 // Clears the host cache. Intended to be used to prevent exposing recently |
| 114 // visited sites on about:net-internals/#dns and about:dns pages. Must be | 113 // visited sites on about:net-internals/#dns and about:dns pages. Must be |
| 115 // called on the IO thread. | 114 // called on the IO thread. |
| 116 void ClearHostCache(); | 115 void ClearHostCache(); |
| 117 | 116 |
| 118 // Convenience method similar to base::Thread, giving access to the | |
| 119 // actual IO thread. | |
| 120 // TODO(joi): Remove this in follow-up changes. | |
| 121 MessageLoop* message_loop() const; | |
| 122 | |
| 123 private: | 117 private: |
| 124 // BrowserThreadDelegate implementation, runs on the IO thread. | 118 // BrowserThreadDelegate implementation, runs on the IO thread. |
| 125 // This handles initialization and destruction of state that must | 119 // This handles initialization and destruction of state that must |
| 126 // live on the IO thread. | 120 // live on the IO thread. |
| 127 virtual void Init() OVERRIDE; | 121 virtual void Init() OVERRIDE; |
| 128 virtual void CleanUp() OVERRIDE; | 122 virtual void CleanUp() OVERRIDE; |
| 129 | 123 |
| 130 // Provide SystemURLRequestContextGetter with access to | 124 // Provide SystemURLRequestContextGetter with access to |
| 131 // InitSystemRequestContext(). | 125 // InitSystemRequestContext(). |
| 132 friend class SystemURLRequestContextGetter; | 126 friend class SystemURLRequestContextGetter; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 system_url_request_context_getter_; | 189 system_url_request_context_getter_; |
| 196 | 190 |
| 197 net::SdchManager* sdch_manager_; | 191 net::SdchManager* sdch_manager_; |
| 198 | 192 |
| 199 base::WeakPtrFactory<IOThread> weak_factory_; | 193 base::WeakPtrFactory<IOThread> weak_factory_; |
| 200 | 194 |
| 201 DISALLOW_COPY_AND_ASSIGN(IOThread); | 195 DISALLOW_COPY_AND_ASSIGN(IOThread); |
| 202 }; | 196 }; |
| 203 | 197 |
| 204 #endif // CHROME_BROWSER_IO_THREAD_H_ | 198 #endif // CHROME_BROWSER_IO_THREAD_H_ |
| OLD | NEW |