Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_RENDERER_SCHEDULER_BASE_TASK_TIME_TRACKER_H_ | |
| 6 #define CONTENT_RENDERER_SCHEDULER_BASE_TASK_TIME_TRACKER_H_ | |
| 7 | |
| 8 #include <memory> | |
| 9 #include <vector> | |
| 10 | |
| 11 #include "base/macros.h" | |
| 12 #include "base/time/default_tick_clock.h" | |
| 13 #include "base/time/time.h" | |
| 14 #include "components/scheduler/base/queueing_time_estimator.h" | |
| 15 #include "components/scheduler/scheduler_export.h" | |
| 16 | |
| 17 namespace base { | |
| 18 class TickClock; | |
|
Sami
2016/07/05 14:40:39
Unused?
tdresser
2016/07/05 15:52:20
Done.
| |
| 19 } | |
| 20 | |
| 21 namespace scheduler { | |
| 22 | |
| 23 class SCHEDULER_EXPORT TaskTimeTracker : public QueueingTimeEstimator::Client { | |
|
Sami
2016/07/05 14:40:39
I'm wondering if this should just be a virtual int
alex clarke (OOO till 29th)
2016/07/05 14:59:35
+1 we'd like to use the timings for other purposes
tdresser
2016/07/05 20:09:38
Done.
| |
| 24 public: | |
| 25 class TaskTimeObserver { | |
| 26 public: | |
| 27 virtual void OnQueueingTimeForWindowEstimated( | |
| 28 base::TimeDelta queueing_time) = 0; | |
| 29 virtual ~TaskTimeObserver() {} | |
| 30 }; | |
| 31 | |
| 32 TaskTimeTracker(); | |
| 33 ~TaskTimeTracker() override; | |
| 34 | |
| 35 void ReportTaskTime(base::TimeTicks startTime, base::TimeTicks endTime); | |
| 36 void SetObserver(TaskTimeObserver*); | |
| 37 | |
| 38 // QueueingTimeEstimator::Client implementation: | |
| 39 void OnQueueingTimeForWindowEstimated(base::TimeDelta queueing_time) override; | |
| 40 | |
| 41 TaskTimeObserver* task_time_observer_; // Not Owned | |
|
Sami
2016/07/05 14:40:39
Did you mean to make these private? This observer
tdresser
2016/07/05 15:52:20
Yeah, they're private in the next patch.
Removed
| |
| 42 QueueingTimeEstimator queueing_time_estimator_; | |
| 43 }; // scheduler | |
|
alex clarke (OOO till 29th)
2016/07/05 13:47:45
nit: DISALLOW_COPY_AND_ASSIGN
tdresser
2016/07/05 14:30:13
Eeep - and also add "private".
Done.
| |
| 44 | |
| 45 #endif // CONTENT_RENDERER_SCHEDULER_BASE_TASK_TIME_TRACKER_H_ | |
| 46 | |
| 47 } | |
|
Sami
2016/07/05 14:40:39
This brace seems misplaced.
tdresser
2016/07/05 20:09:38
Done.
| |
| OLD | NEW |