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

Unified Diff: chrome/browser/jankometer.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/gtk/dialogs_gtk.cc ('k') | chrome/browser/memory_details.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/jankometer.cc
===================================================================
--- chrome/browser/jankometer.cc (revision 30650)
+++ chrome/browser/jankometer.cc (working copy)
@@ -18,6 +18,7 @@
#include "base/watchdog.h"
#include "build/build_config.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/chrome_thread.h"
#include "chrome/common/chrome_switches.h"
#if defined(OS_LINUX)
@@ -249,12 +250,9 @@
TimeDelta::FromMilliseconds(kMaxIOMessageDelayMs),
io_watchdog_enabled);
io_observer->AddRef();
- base::Thread* io_thread = g_browser_process->io_thread();
- if (io_thread) {
- io_thread->message_loop()->PostTask(FROM_HERE,
- NewRunnableMethod(io_observer,
- &JankObserver::AttachToCurrentThread));
- }
+ ChromeThread::PostTask(
+ ChromeThread::IO, FROM_HERE,
+ NewRunnableMethod(io_observer, &JankObserver::AttachToCurrentThread));
}
void UninstallJankometer() {
« no previous file with comments | « chrome/browser/gtk/dialogs_gtk.cc ('k') | chrome/browser/memory_details.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698