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

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: Rebased Created 5 years, 1 month 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
« no previous file with comments | « components/scheduler/DEPS ('k') | components/scheduler/base/lazy_now.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..fd52322a964f13a3d4fb772804717787d8d282d4 100644
--- a/components/scheduler/base/lazy_now.h
+++ b/components/scheduler/base/lazy_now.h
@@ -7,27 +7,27 @@
#include "base/time/time.h"
-namespace scheduler {
-class TaskQueueManager;
+namespace base {
+class TickClock;
+}
+namespace scheduler {
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_;
};
« no previous file with comments | « components/scheduler/DEPS ('k') | components/scheduler/base/lazy_now.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698