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 scheduler { | |
18 | |
19 class SCHEDULER_EXPORT TaskTimeTracker { | |
Sami
2016/07/06 10:08:29
Is there a reason to keep TaskTimeTracker and Task
tdresser
2016/07/06 13:25:34
Done.
| |
20 public: | |
21 class SCHEDULER_EXPORT Observer { | |
alex clarke (OOO till 29th)
2016/07/06 09:51:39
Nit: DISALLOW_COPY_AND_ASSIGN(Observer)
tdresser
2016/07/06 13:25:34
No longer needed.
| |
22 public: | |
23 virtual void ReportTaskTime(base::TimeTicks start_time, | |
24 base::TimeTicks end_time) = 0; | |
25 virtual ~Observer() {} | |
26 }; | |
27 | |
28 TaskTimeTracker(Observer* observer); | |
alex clarke (OOO till 29th)
2016/07/06 09:51:39
nit: explicit
tdresser
2016/07/06 13:25:34
No longer needed.
| |
29 ~TaskTimeTracker(); | |
30 | |
31 void ReportTaskTime(base::TimeTicks startTime, base::TimeTicks endTime); | |
32 | |
33 private: | |
34 // Not owned. | |
35 Observer* observer_; | |
36 | |
37 DISALLOW_COPY_AND_ASSIGN(TaskTimeTracker); | |
38 }; | |
39 | |
40 } // namespace scheduler | |
41 | |
42 #endif // CONTENT_RENDERER_SCHEDULER_BASE_TASK_TIME_TRACKER_H_ | |
OLD | NEW |