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

Unified Diff: chrome/browser/jankometer.cc

Issue 4081003: Added task to Observer methods (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Made default birthplace a local static Created 10 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 | « base/tracked.cc ('k') | no next file » | 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 a9a99b0072b08077e48e3266b4de5c45005c86ca..e58b71ac024a908d08f0c429fb89ab155460399f 100644
--- a/chrome/browser/jankometer.cc
+++ b/chrome/browser/jankometer.cc
@@ -206,13 +206,13 @@ class IOJankObserver : public base::RefCountedThreadSafe<IOJankObserver>,
helper_.EndProcessingTimers();
}
- virtual void WillProcessTask(base::TimeTicks birth_time) {
+ virtual void WillProcessTask(const Task* task) {
base::TimeTicks now = base::TimeTicks::Now();
- const base::TimeDelta queueing_time = now - birth_time;
+ const base::TimeDelta queueing_time = now - task->tracked_birth_time();
helper_.StartProcessingTimers(queueing_time);
}
- virtual void DidProcessTask() {
+ virtual void DidProcessTask(const Task* task) {
helper_.EndProcessingTimers();
}
@@ -250,13 +250,13 @@ class UIJankObserver : public base::RefCountedThreadSafe<UIJankObserver>,
MessageLoopForUI::current()->RemoveObserver(this);
}
- virtual void WillProcessTask(base::TimeTicks birth_time) {
+ virtual void WillProcessTask(const Task* task) {
base::TimeTicks now = base::TimeTicks::Now();
- const base::TimeDelta queueing_time = now - birth_time;
+ const base::TimeDelta queueing_time = now - task->tracked_birth_time();
helper_.StartProcessingTimers(queueing_time);
}
- virtual void DidProcessTask() {
+ virtual void DidProcessTask(const Task* task) {
helper_.EndProcessingTimers();
}
« no previous file with comments | « base/tracked.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698