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

Unified Diff: base/message_loop/message_loop.h

Issue 1898233002: Report expected task queueing time via UMA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Super rough alternative approach. Created 4 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
« no previous file with comments | « no previous file | base/message_loop/message_loop.cc » ('j') | base/message_loop/message_loop.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop/message_loop.h
diff --git a/base/message_loop/message_loop.h b/base/message_loop/message_loop.h
index 8e73d42b1e278dac9f68a58eeb1a01af84f6149e..7f991decdb7a87bbff7d868c63fc3e53f43eb1e6 100644
--- a/base/message_loop/message_loop.h
+++ b/base/message_loop/message_loop.h
@@ -171,6 +171,17 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
void AddNestingObserver(NestingObserver* observer);
void RemoveNestingObserver(NestingObserver* observer);
+ class BASE_EXPORT RecentTimeObserver {
+ public:
+ virtual void OnUpdateRecentTime(base::TimeTicks recent_time) = 0;
+
+ protected:
+ virtual ~RecentTimeObserver();
+ };
+
+ void AddRecentTimeObserver(RecentTimeObserver* observer);
+ void RemoveRecentTimeObserver(RecentTimeObserver* observer);
+
// NOTE: Deprecated; prefer task_runner() and the TaskRunner interfaces.
// TODO(skyostil): Remove these functions (crbug.com/465354).
//
@@ -509,6 +520,8 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
ObserverList<NestingObserver> nesting_observers_;
+ ObserverList<RecentTimeObserver> recent_time_observers_;
+
// A recursion block that prevents accidentally running additional tasks when
// insider a (accidentally induced?) nested message pump.
bool nestable_tasks_allowed_;
« no previous file with comments | « no previous file | base/message_loop/message_loop.cc » ('j') | base/message_loop/message_loop.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698