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

Unified Diff: components/scheduler/base/lazy_now.h

Issue 1424053002: Adds a flag to support "Virtual Time" to the blink scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a test Created 5 years, 2 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: 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_;
};

Powered by Google App Engine
This is Rietveld 408576698