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

Unified Diff: chrome/browser/jankometer.cc

Issue 141683005: Removes MessageLoop::Type checks in favor of IsCurrent on MessageLoops. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: base:: Created 6 years, 11 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/external_protocol/external_protocol_handler.cc ('k') | chrome/browser/printing/print_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/jankometer.cc
diff --git a/chrome/browser/jankometer.cc b/chrome/browser/jankometer.cc
index a5d841d9172b129ceee6ed4708f3cf7b3801020e..a159064b96a9b9913cbf512959f62a4d8b0cf620 100644
--- a/chrome/browser/jankometer.cc
+++ b/chrome/browser/jankometer.cc
@@ -280,14 +280,14 @@ 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(base::MessageLoop::current()->type(), base::MessageLoop::TYPE_UI);
+ DCHECK(base::MessageLoopForUI::IsCurrent());
base::MessageLoopForUI::current()->AddObserver(this);
base::MessageLoop::current()->AddTaskObserver(this);
}
// Detaches the observer to the current thread's message loop.
void DetachFromCurrentThread() {
- DCHECK_EQ(base::MessageLoop::current()->type(), base::MessageLoop::TYPE_UI);
+ DCHECK(base::MessageLoopForUI::IsCurrent());
base::MessageLoop::current()->RemoveTaskObserver(this);
base::MessageLoopForUI::current()->RemoveObserver(this);
}
« no previous file with comments | « chrome/browser/external_protocol/external_protocol_handler.cc ('k') | chrome/browser/printing/print_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698