Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Side by Side Diff: chrome/browser/io_thread.h

Issue 8477004: Have content/ create and destroy its own threads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More IWYU, missing link-time dependency for Chrome Frame. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 class OriginBoundCertService; 42 class OriginBoundCertService;
43 class ProxyConfigService; 43 class ProxyConfigService;
44 class ProxyService; 44 class ProxyService;
45 class SdchManager; 45 class SdchManager;
46 class SSLConfigService; 46 class SSLConfigService;
47 class URLRequestContext; 47 class URLRequestContext;
48 class URLRequestContextGetter; 48 class URLRequestContextGetter;
49 class URLSecurityManager; 49 class URLSecurityManager;
50 } // namespace net 50 } // namespace net
51 51
52 class IOThread : public content::BrowserProcessSubThread { 52 // Contains state associated with, and primarily used on, the IO
53 // thread. Also acts as a convenience accessor to the Thread object
54 // for the IO thread.
55 class IOThread {
53 public: 56 public:
54 struct Globals { 57 struct Globals {
55 Globals(); 58 Globals();
56 ~Globals(); 59 ~Globals();
57 60
58 struct MediaGlobals { 61 struct MediaGlobals {
59 MediaGlobals(); 62 MediaGlobals();
60 ~MediaGlobals(); 63 ~MediaGlobals();
61 // MediaInternals singleton used to aggregate media information. 64 // MediaInternals singleton used to aggregate media information.
62 scoped_ptr<MediaInternals> media_internals; 65 scoped_ptr<MediaInternals> media_internals;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 ChromeNetLog* net_log(); 111 ChromeNetLog* net_log();
109 112
110 // Returns a getter for the URLRequestContext. Only called on the UI thread. 113 // Returns a getter for the URLRequestContext. Only called on the UI thread.
111 net::URLRequestContextGetter* system_url_request_context_getter(); 114 net::URLRequestContextGetter* system_url_request_context_getter();
112 115
113 // Clears the host cache. Intended to be used to prevent exposing recently 116 // 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 117 // visited sites on about:net-internals/#dns and about:dns pages. Must be
115 // called on the IO thread. 118 // called on the IO thread.
116 void ClearHostCache(); 119 void ClearHostCache();
117 120
121 // Convenience method similar to base::Thread, giving access to the
122 // actual IO thread.
123 // TODO(joi): Remove this in follow-up changes.
124 MessageLoop* message_loop() const;
125
118 protected: 126 protected:
119 virtual void Init(); 127 virtual void Init();
120 virtual void CleanUp(); 128 virtual void CleanUp();
121 129
122 private: 130 private:
123 // Provide SystemURLRequestContextGetter with access to 131 // Provide SystemURLRequestContextGetter with access to
124 // InitSystemRequestContext(). 132 // InitSystemRequestContext().
125 friend class SystemURLRequestContextGetter; 133 friend class SystemURLRequestContextGetter;
126 134
127 static void RegisterPrefs(PrefService* local_state); 135 static void RegisterPrefs(PrefService* local_state);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 system_url_request_context_getter_; 192 system_url_request_context_getter_;
185 193
186 net::SdchManager* sdch_manager_; 194 net::SdchManager* sdch_manager_;
187 195
188 ScopedRunnableMethodFactory<IOThread> method_factory_; 196 ScopedRunnableMethodFactory<IOThread> method_factory_;
189 197
190 DISALLOW_COPY_AND_ASSIGN(IOThread); 198 DISALLOW_COPY_AND_ASSIGN(IOThread);
191 }; 199 };
192 200
193 #endif // CHROME_BROWSER_IO_THREAD_H_ 201 #endif // CHROME_BROWSER_IO_THREAD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698