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

Unified Diff: chrome/browser/jankometer.cc

Issue 12161002: MessageLoop's RUN method will pass a const ref to PendingTask when (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 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/google_apis/test_util.cc ('k') | content/browser/browser_main_loop.cc » ('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 180270)
+++ chrome/browser/jankometer.cc (working copy)
@@ -13,6 +13,7 @@
#include "base/message_loop.h"
#include "base/metrics/histogram.h"
#include "base/metrics/stats_counters.h"
+#include "base/pending_task.h"
#include "base/string_util.h"
#include "base/threading/thread.h"
#include "base/threading/watchdog.h"
@@ -241,15 +242,15 @@
helper_.EndProcessingTimers();
}
- virtual void WillProcessTask(base::TimeTicks time_posted) OVERRIDE {
+ virtual void WillProcessTask(const base::PendingTask& pending_task) OVERRIDE {
if (!helper_.MessageWillBeMeasured())
return;
base::TimeTicks now = base::TimeTicks::Now();
- const base::TimeDelta queueing_time = now - time_posted;
+ const base::TimeDelta queueing_time = now - pending_task.time_posted;
helper_.StartProcessingTimers(queueing_time);
}
- virtual void DidProcessTask(base::TimeTicks time_posted) OVERRIDE {
+ virtual void DidProcessTask(const base::PendingTask& pending_task) OVERRIDE {
helper_.EndProcessingTimers();
}
@@ -289,15 +290,15 @@
MessageLoopForUI::current()->RemoveObserver(this);
}
- virtual void WillProcessTask(base::TimeTicks time_posted) OVERRIDE {
+ virtual void WillProcessTask(const base::PendingTask& pending_task) OVERRIDE {
if (!helper_.MessageWillBeMeasured())
return;
base::TimeTicks now = base::TimeTicks::Now();
- const base::TimeDelta queueing_time = now - time_posted;
+ const base::TimeDelta queueing_time = now - pending_task.time_posted;
helper_.StartProcessingTimers(queueing_time);
}
- virtual void DidProcessTask(base::TimeTicks time_posted) OVERRIDE {
+ virtual void DidProcessTask(const base::PendingTask& pending_task) OVERRIDE {
helper_.EndProcessingTimers();
}
« no previous file with comments | « chrome/browser/google_apis/test_util.cc ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698