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

Unified Diff: chrome/browser/jankometer.cc

Issue 6463013: Add support for base::Closure in the MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/base
Patch Set: rebased Created 9 years, 8 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 | « base/message_loop_unittest.cc ('k') | content/gpu/gpu_watchdog_thread.h » ('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 14be3be8574dd13f811e830c4ce704bd6c59c9e5..eeb4a18efb3a7bdabb9eedae914b31d64a626fda 100644
--- a/chrome/browser/jankometer.cc
+++ b/chrome/browser/jankometer.cc
@@ -235,25 +235,25 @@ class IOJankObserver : public base::RefCountedThreadSafe<IOJankObserver>,
MessageLoop::current()->RemoveTaskObserver(this);
}
- virtual void WillProcessIOEvent() {
+ virtual void WillProcessIOEvent() OVERRIDE {
if (!helper_.MessageWillBeMeasured())
return;
helper_.StartProcessingTimers(base::TimeDelta());
}
- virtual void DidProcessIOEvent() {
+ virtual void DidProcessIOEvent() OVERRIDE {
helper_.EndProcessingTimers();
}
- virtual void WillProcessTask(const Task* task) {
+ virtual void WillProcessTask(base::TimeTicks time_posted) OVERRIDE {
if (!helper_.MessageWillBeMeasured())
return;
base::TimeTicks now = base::TimeTicks::Now();
- const base::TimeDelta queueing_time = now - task->tracked_birth_time();
+ const base::TimeDelta queueing_time = now - time_posted;
helper_.StartProcessingTimers(queueing_time);
}
- virtual void DidProcessTask(const Task* task) {
+ virtual void DidProcessTask(base::TimeTicks time_posted) OVERRIDE {
helper_.EndProcessingTimers();
}
@@ -291,15 +291,15 @@ class UIJankObserver : public base::RefCountedThreadSafe<UIJankObserver>,
MessageLoopForUI::current()->RemoveObserver(this);
}
- virtual void WillProcessTask(const Task* task) {
+ virtual void WillProcessTask(base::TimeTicks time_posted) OVERRIDE {
if (!helper_.MessageWillBeMeasured())
return;
base::TimeTicks now = base::TimeTicks::Now();
- const base::TimeDelta queueing_time = now - task->tracked_birth_time();
+ const base::TimeDelta queueing_time = now - time_posted;
helper_.StartProcessingTimers(queueing_time);
}
- virtual void DidProcessTask(const Task* task) {
+ virtual void DidProcessTask(base::TimeTicks time_posted) OVERRIDE {
helper_.EndProcessingTimers();
}
« no previous file with comments | « base/message_loop_unittest.cc ('k') | content/gpu/gpu_watchdog_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698