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

Unified Diff: chrome/browser/chrome_thread.h

Issue 171088: Add the UI thread to the list of ChromeThreads. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 months 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/browser_main.cc ('k') | chrome/browser/chrome_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_thread.h
===================================================================
--- chrome/browser/chrome_thread.h (revision 23591)
+++ chrome/browser/chrome_thread.h (working copy)
@@ -29,6 +29,9 @@
public:
// An enumeration of the well-known threads.
enum ID {
+ // The main thread in the browser.
+ UI,
+
// This is the thread that processes IPC and network messages.
IO,
@@ -61,6 +64,11 @@
// Construct a ChromeThread with the supplied identifier. It is an error
// to construct a ChromeThread that already exists.
explicit ChromeThread(ID identifier);
+
+ // Special constructor for the main (UI) thread. We use a dummy thread here
+ // since the main thread already exists.
+ ChromeThread();
+
virtual ~ChromeThread();
// Callable on any thread, this helper function returns a pointer to the
@@ -83,6 +91,9 @@
static bool CurrentlyOn(ID identifier);
private:
+ // Common initialization code for the constructors.
+ void Initialize();
+
// The identifier of this thread. Only one thread can exist with a given
// identifier at a given time.
ID identifier_;
« no previous file with comments | « chrome/browser/browser_main.cc ('k') | chrome/browser/chrome_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698