diff options
author | jorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-08 01:05:18 +0000 |
---|---|---|
committer | jorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-08 01:05:18 +0000 |
commit | 0e0b9771cc4fe496403a49126ec7cfa6c422a6d0 (patch) | |
tree | ce10c712de9d295dfe9457f0fa065806d6c5abb5 /chrome/browser/chrome_thread.h | |
parent | e90355370c3763d71fb0f6346f08ef1b3246fa58 (diff) | |
download | chromium_src-0e0b9771cc4fe496403a49126ec7cfa6c422a6d0.zip chromium_src-0e0b9771cc4fe496403a49126ec7cfa6c422a6d0.tar.gz chromium_src-0e0b9771cc4fe496403a49126ec7cfa6c422a6d0.tar.bz2 |
Simplify the WebKit thread model. It's now created/destroyed on the UI thread (before/after the IO thread is started/stopped). The WebKit thread is created lazily as needed (while on the IO thread).TEST=noneBUG=none
Review URL: http://codereview.chromium.org/149238
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20109 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chrome_thread.h')
-rw-r--r-- | chrome/browser/chrome_thread.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/chrome/browser/chrome_thread.h b/chrome/browser/chrome_thread.h index 1fd1901..4978214 100644 --- a/chrome/browser/chrome_thread.h +++ b/chrome/browser/chrome_thread.h @@ -38,6 +38,10 @@ class ChromeThread : public base::Thread { // 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 @@ class ChromeThread : public base::Thread { // 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. |