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

Unified Diff: third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h

Issue 2259013003: Move and rename TaskTimeTracker to public interface exposed to WebThread, use in WebPerf Agent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: explicitly check if task_start_time was set Created 4 years, 4 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
Index: third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h
diff --git a/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h b/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h
index 7e84e40b8ce5d69bdb2427ac808e5c71d67ed890..f268628b20ea48325bbad1c69903d7e4dfdd9f10 100644
--- a/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h
+++ b/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h
@@ -38,7 +38,7 @@ class LazyNow;
class RealTimeDomain;
class TimeDomain;
class TaskQueueManagerDelegate;
-class TaskTimeTracker;
+class TaskTimeObserver;
// The task queue manager provides N task queues and a selector interface for
// choosing which task queue to service next. Each task queue consists of two
@@ -83,17 +83,12 @@ class BLINK_PLATFORM_EXPORT TaskQueueManager
// tasks posted to the main loop. The batch size is 1 by default.
void SetWorkBatchSize(int work_batch_size);
- // When given a non-null TaskTimeTracker, the TaskQueueManager calls its
- // ReportTaskTime method for every top level task. The task_time_tracker must
- // outlive this object, or be removed via SetTaskTimeTracker(nullptr).
- void SetTaskTimeTracker(TaskTimeTracker* task_time_tracker) {
- task_time_tracker_ = task_time_tracker;
- }
-
// These functions can only be called on the same thread that the task queue
// manager executes its tasks on.
void AddTaskObserver(base::MessageLoop::TaskObserver* task_observer);
void RemoveTaskObserver(base::MessageLoop::TaskObserver* task_observer);
+ void AddTaskTimeObserver(TaskTimeObserver* task_time_observer);
+ void RemoveTaskTimeObserver(TaskTimeObserver* task_time_observer);
// Returns true if any task from a monitored task queue was was run since the
// last call to GetAndClearSystemIsQuiescentBit.
@@ -248,7 +243,7 @@ class BLINK_PLATFORM_EXPORT TaskQueueManager
base::ObserverList<base::MessageLoop::TaskObserver> task_observers_;
- TaskTimeTracker* task_time_tracker_; // NOT OWNED
+ base::ObserverList<TaskTimeObserver> task_time_observers_;
const char* tracing_category_;
const char* disabled_by_default_tracing_category_;

Powered by Google App Engine
This is Rietveld 408576698