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

Unified Diff: chrome/browser/io_thread.h

Issue 8718012: Revert 111695 - Have content/ create and destroy its own threads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/login/webui_screen_locker.cc ('k') | chrome/browser/io_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/io_thread.h
===================================================================
--- chrome/browser/io_thread.h (revision 111697)
+++ chrome/browser/io_thread.h (working copy)
@@ -9,26 +9,13 @@
#include <string>
#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "chrome/browser/net/ssl_config_service_manager.h"
#include "chrome/browser/prefs/pref_member.h"
-#include "content/public/browser/browser_thread.h"
-#include "content/public/browser/browser_thread_delegate.h"
+#include "content/browser/browser_process_sub_thread.h"
#include "net/base/network_change_notifier.h"
-// TODO(joi): Remove these in a follow-up change and IWYU in files
-// that were getting them directly or indirectly from here.
-#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/message_loop.h"
-#include "base/message_loop_proxy.h"
-#include "base/synchronization/lock.h"
-#include "base/threading/thread.h"
-
-class BrowserProcessImpl;
class ChromeNetLog;
class ExtensionEventRouterForwarder;
class MediaInternals;
@@ -56,10 +43,7 @@
class URLSecurityManager;
} // namespace net
-// Contains state associated with, initialized and cleaned up on, and
-// primarily used on, the IO thread. Also acts as a convenience
-// accessor to the Thread object for the IO thread.
-class IOThread : public content::BrowserThreadDelegate {
+class IOThread : public content::BrowserProcessSubThread {
public:
struct Globals {
Globals();
@@ -125,37 +109,26 @@
// called on the IO thread.
void ClearHostCache();
- // Convenience method similar to base::Thread, giving access to the
- // actual IO thread.
- // TODO(joi): Remove this in follow-up changes.
- MessageLoop* message_loop() const;
-
- private:
- // BrowserThreadDelegate implementation, runs on the IO thread.
- // This handles initialization and destruction of state that must
- // live on the IO thread.
+ protected:
virtual void Init() OVERRIDE;
virtual void CleanUp() OVERRIDE;
+ private:
// Provide SystemURLRequestContextGetter with access to
// InitSystemRequestContext().
friend class SystemURLRequestContextGetter;
- // Global state must be initialized on the IO thread, then this
- // method must be invoked on the UI thread.
- void InitSystemRequestContext();
-
- // Lazy initialization of system request context for
- // SystemURLRequestContextGetter. To be called on IO thread only
- // after global state has been initialized on the IO thread, and
- // SystemRequestContext state has been initialized on the UI thread.
- void InitSystemRequestContextOnIOThread();
-
static void RegisterPrefs(PrefService* local_state);
net::HttpAuthHandlerFactory* CreateDefaultAuthHandlerFactory(
net::HostResolver* resolver);
+ void InitSystemRequestContext();
+
+ // Lazy initialization of system request context for
+ // SystemURLRequestContextGetter. To be called on IO thread.
+ void InitSystemRequestContextOnIOThread();
+
// Returns an SSLConfigService instance.
net::SSLConfigService* GetSSLConfigService();
« no previous file with comments | « chrome/browser/chromeos/login/webui_screen_locker.cc ('k') | chrome/browser/io_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698