Chromium Code Reviews| Index: components/scheduler/base/lazy_now.h |
| diff --git a/components/scheduler/base/lazy_now.h b/components/scheduler/base/lazy_now.h |
| index db5f05948ea3b672e154967d260f6381f4911386..fc56b8131666dd8b29351b7d15c2bb388644b644 100644 |
| --- a/components/scheduler/base/lazy_now.h |
| +++ b/components/scheduler/base/lazy_now.h |
| @@ -5,29 +5,25 @@ |
| #ifndef COMPONENTS_SCHEDULER_BASE_LAZY_NOW_H_ |
| #define COMPONENTS_SCHEDULER_BASE_LAZY_NOW_H_ |
| -#include "base/time/time.h" |
| +#include "base/time/tick_clock.h" |
|
Sami
2015/10/28 20:00:34
nit: Forward decl instead?
alex clarke (OOO till 29th)
2015/10/29 18:07:30
Done.
|
| namespace scheduler { |
| -class TaskQueueManager; |
| - |
| namespace internal { |
| // Now() is somewhat expensive so it makes sense not to call Now() unless we |
| // really need to. |
| class LazyNow { |
| public: |
| - explicit LazyNow(base::TimeTicks now) |
| - : task_queue_manager_(nullptr), now_(now) { |
| + explicit LazyNow(base::TimeTicks now) : tick_clock_(nullptr), now_(now) { |
| DCHECK(!now.is_null()); |
| } |
| - explicit LazyNow(TaskQueueManager* task_queue_manager) |
| - : task_queue_manager_(task_queue_manager) {} |
| + explicit LazyNow(base::TickClock* tick_clock) : tick_clock_(tick_clock) {} |
| base::TimeTicks Now(); |
| private: |
| - TaskQueueManager* task_queue_manager_; // NOT OWNED |
| + base::TickClock* tick_clock_; // NOT OWNED |
| base::TimeTicks now_; |
| }; |