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

Unified Diff: components/scheduler/base/task_queue_manager.cc

Issue 1411843008: Make blink platform time consistent with the timer virtual time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix CachingCorrectnessTest 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
Index: components/scheduler/base/task_queue_manager.cc
diff --git a/components/scheduler/base/task_queue_manager.cc b/components/scheduler/base/task_queue_manager.cc
index f859d0c1d13cae8a4cd615f2e784d943893b13d5..2f557355deda5b264f93b01d47535009bd0ed9a2 100644
--- a/components/scheduler/base/task_queue_manager.cc
+++ b/components/scheduler/base/task_queue_manager.cc
@@ -171,7 +171,7 @@ void TaskQueueManager::UpdateWorkQueues(
DCHECK(main_thread_checker_.CalledOnValidThread());
TRACE_EVENT0(disabled_by_default_tracing_category_,
"TaskQueueManager::UpdateWorkQueues");
- internal::LazyNow lazy_now(tick_clock());
+ internal::LazyNow lazy_now(delegate().get());
// Move any ready delayed tasks into the incomming queues.
WakeupReadyDelayedQueues(&lazy_now);
@@ -192,7 +192,7 @@ void TaskQueueManager::UpdateWorkQueues(
void TaskQueueManager::ScheduleDelayedWorkTask(
scoped_refptr<internal::TaskQueueImpl> queue,
base::TimeTicks delayed_run_time) {
- internal::LazyNow lazy_now(tick_clock());
+ internal::LazyNow lazy_now(delegate().get());
ScheduleDelayedWork(queue.get(), delayed_run_time, &lazy_now);
}
@@ -400,8 +400,9 @@ bool TaskQueueManager::GetAndClearSystemIsQuiescentBit() {
return !task_was_run;
}
-base::TickClock* TaskQueueManager::tick_clock() const {
- return delegate_.get();
+const scoped_refptr<TaskQueueManagerDelegate>& TaskQueueManager::delegate()
+ const {
+ return delegate_;
}
int TaskQueueManager::GetNextSequenceNumber() {
« no previous file with comments | « components/scheduler/base/task_queue_manager.h ('k') | components/scheduler/base/task_queue_manager_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698