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

Unified Diff: chrome/browser/chrome_thread.h

Issue 149238: Change the lifetime of the WebKit thread to be a subset of the IO thread's li... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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 | « no previous file | 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 20100)
+++ chrome/browser/chrome_thread.h (working copy)
@@ -38,6 +38,10 @@
// This is the thread that interacts with the database.
DB,
+ // This is the "main" thread for WebKit within the browser process when
+ // NOT in --single-process mode.
+ WEBKIT,
+
// This is the thread that interacts with the history database.
HISTORY,
@@ -68,6 +72,16 @@
//
static MessageLoop* GetMessageLoop(ID identifier);
+ // Callable on any thread. Returns whether you're currently on a particular
+ // thread.
+ //
+ // WARNING:
+ // When running under unit-tests, this will return true if you're on the
+ // main thread and the thread ID you pass in isn't running. This is
+ // normally the correct behavior because you want to ignore these asserts
+ // unless you've specifically spun up the threads, but be mindful of it.
+ static bool CurrentlyOn(ID identifier);
+
private:
// The identifier of this thread. Only one thread can exist with a given
// identifier at a given time.
« no previous file with comments | « no previous file | chrome/browser/chrome_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698