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

Unified Diff: chrome/browser/memory_details.cc

Issue 342068: Third patch in getting rid of caching MessageLoop pointers and always using C... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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/memory_details.h ('k') | chrome/browser/memory_details_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/memory_details.cc
===================================================================
--- chrome/browser/memory_details.cc (revision 30650)
+++ chrome/browser/memory_details.cc (working copy)
@@ -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(!ChromeThread::CurrentlyOn(ChromeThread::IO));
+ DCHECK(!ChromeThread::CurrentlyOn(ChromeThread::FILE));
- DCHECK(ui_loop_ != g_browser_process->io_thread()->message_loop());
- DCHECK(ui_loop_ != g_browser_process->file_thread()->message_loop());
-
// 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::CollectChildInfoOnUIThread() {
- DCHECK(MessageLoop::current() == ui_loop_);
+ DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
#if defined(OS_LINUX)
const pid_t zygote_pid = Singleton<ZygoteHost>()->pid();
« no previous file with comments | « chrome/browser/memory_details.h ('k') | chrome/browser/memory_details_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698