diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-02 05:59:37 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-02 05:59:37 +0000 |
commit | 6fad26338ed6119903826156f307e20fe6657c31 (patch) | |
tree | 5c6baed35fce907a0cea47ed6091c941db8ebfd1 /chrome/browser/memory_details.cc | |
parent | f75c8f13b967b01babc9454506e9d2ed00519e39 (diff) | |
download | chromium_src-6fad26338ed6119903826156f307e20fe6657c31.zip chromium_src-6fad26338ed6119903826156f307e20fe6657c31.tar.gz chromium_src-6fad26338ed6119903826156f307e20fe6657c31.tar.bz2 |
Third patch in getting rid of caching MessageLoop pointers and always using ChromeThread instead.
BUG=25354
Review URL: http://codereview.chromium.org/342068
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30687 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/memory_details.cc')
-rw-r--r-- | chrome/browser/memory_details.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/chrome/browser/memory_details.cc b/chrome/browser/memory_details.cc index eed3bc9..4ea4444 100644 --- a/chrome/browser/memory_details.cc +++ b/chrome/browser/memory_details.cc @@ -8,7 +8,6 @@ #include "base/file_version_info.h" #include "base/process_util.h" #include "base/string_util.h" -#include "chrome/browser/browser_process.h" #include "chrome/browser/chrome_thread.h" #include "chrome/browser/renderer_host/backing_store_manager.h" #include "chrome/browser/renderer_host/render_process_host.h" @@ -37,14 +36,13 @@ // void MemoryDetails::StartFetch() { - ui_loop_ = MessageLoop::current(); - - DCHECK(ui_loop_ != g_browser_process->io_thread()->message_loop()); - DCHECK(ui_loop_ != g_browser_process->file_thread()->message_loop()); + DCHECK(!ChromeThread::CurrentlyOn(ChromeThread::IO)); + DCHECK(!ChromeThread::CurrentlyOn(ChromeThread::FILE)); // In order to process this request, we need to use the plugin information. // However, plugin process information is only available from the IO thread. - g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, + ChromeThread::PostTask( + ChromeThread::IO, FROM_HERE, NewRunnableMethod(this, &MemoryDetails::CollectChildInfoOnIOThread)); } @@ -72,7 +70,7 @@ void MemoryDetails::CollectChildInfoOnIOThread() { } void MemoryDetails::CollectChildInfoOnUIThread() { - DCHECK(MessageLoop::current() == ui_loop_); + DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)); #if defined(OS_LINUX) const pid_t zygote_pid = Singleton<ZygoteHost>()->pid(); |