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

Unified Diff: chrome/browser/jankometer.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 7 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
Index: chrome/browser/jankometer.cc
diff --git a/chrome/browser/jankometer.cc b/chrome/browser/jankometer.cc
index b094ec67eda33832a0e4bdfa271fdea072212338..0cc1388f51bca73007f58447fc24fd7447381915 100644
--- a/chrome/browser/jankometer.cc
+++ b/chrome/browser/jankometer.cc
@@ -210,8 +210,8 @@ int JankObserverHelper::discard_count_ = 99; // Measure only 1 in 100.
//------------------------------------------------------------------------------
class IOJankObserver : public base::RefCountedThreadSafe<IOJankObserver>,
- public MessageLoopForIO::IOObserver,
- public MessageLoop::TaskObserver {
+ public base::MessageLoopForIO::IOObserver,
+ public base::MessageLoop::TaskObserver {
public:
IOJankObserver(const char* thread_name,
TimeDelta excessive_duration,
@@ -222,14 +222,14 @@ class IOJankObserver : public base::RefCountedThreadSafe<IOJankObserver>,
// attach to the current thread, so this function can be invoked on another
// thread to attach it.
void AttachToCurrentThread() {
- MessageLoop::current()->AddTaskObserver(this);
- MessageLoopForIO::current()->AddIOObserver(this);
+ base::MessageLoop::current()->AddTaskObserver(this);
+ base::MessageLoopForIO::current()->AddIOObserver(this);
}
// Detaches the observer to the current thread's message loop.
void DetachFromCurrentThread() {
- MessageLoopForIO::current()->RemoveIOObserver(this);
- MessageLoop::current()->RemoveTaskObserver(this);
+ base::MessageLoopForIO::current()->RemoveIOObserver(this);
+ base::MessageLoop::current()->RemoveTaskObserver(this);
}
virtual void WillProcessIOEvent() OVERRIDE {
@@ -266,8 +266,8 @@ class IOJankObserver : public base::RefCountedThreadSafe<IOJankObserver>,
//------------------------------------------------------------------------------
class UIJankObserver : public base::RefCountedThreadSafe<UIJankObserver>,
- public MessageLoop::TaskObserver,
- public MessageLoopForUI::Observer {
+ public base::MessageLoop::TaskObserver,
+ public base::MessageLoopForUI::Observer {
public:
UIJankObserver(const char* thread_name,
TimeDelta excessive_duration,
@@ -278,16 +278,16 @@ class UIJankObserver : public base::RefCountedThreadSafe<UIJankObserver>,
// attach to the current thread, so this function can be invoked on another
// thread to attach it.
void AttachToCurrentThread() {
- DCHECK_EQ(MessageLoop::current()->type(), MessageLoop::TYPE_UI);
- MessageLoopForUI::current()->AddObserver(this);
- MessageLoop::current()->AddTaskObserver(this);
+ DCHECK_EQ(base::MessageLoop::current()->type(), base::MessageLoop::TYPE_UI);
+ base::MessageLoopForUI::current()->AddObserver(this);
+ base::MessageLoop::current()->AddTaskObserver(this);
}
// Detaches the observer to the current thread's message loop.
void DetachFromCurrentThread() {
- DCHECK_EQ(MessageLoop::current()->type(), MessageLoop::TYPE_UI);
- MessageLoop::current()->RemoveTaskObserver(this);
- MessageLoopForUI::current()->RemoveObserver(this);
+ DCHECK_EQ(base::MessageLoop::current()->type(), base::MessageLoop::TYPE_UI);
+ base::MessageLoop::current()->RemoveTaskObserver(this);
+ base::MessageLoopForUI::current()->RemoveObserver(this);
}
virtual void WillProcessTask(const base::PendingTask& pending_task) OVERRIDE {
« no previous file with comments | « chrome/browser/invalidation/invalidator_storage_unittest.cc ('k') | chrome/browser/lifetime/application_lifetime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698