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

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

Issue 1441073006: Move throttling of background timers into the renderer scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Last few changes Sami requested 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/base/virtual_time_domain.h ('k') | components/scheduler/child/idle_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/scheduler/base/virtual_time_domain.cc
diff --git a/components/scheduler/base/virtual_time_domain.cc b/components/scheduler/base/virtual_time_domain.cc
index 32510394fda1f744ccc79657b91210757fecb1e4..0ed6abbc2c3b99abc90c56a7b57da60ef450b6a2 100644
--- a/components/scheduler/base/virtual_time_domain.cc
+++ b/components/scheduler/base/virtual_time_domain.cc
@@ -10,8 +10,9 @@
namespace scheduler {
-VirtualTimeDomain::VirtualTimeDomain(base::TimeTicks initial_time)
- : now_(initial_time) {}
+VirtualTimeDomain::VirtualTimeDomain(TimeDomain::Observer* observer,
+ base::TimeTicks initial_time)
+ : TimeDomain(observer), now_(initial_time) {}
VirtualTimeDomain::~VirtualTimeDomain() {}
@@ -44,6 +45,8 @@ void VirtualTimeDomain::AdvanceTo(base::TimeTicks now) {
base::AutoLock lock(lock_);
DCHECK_GE(now, now_);
now_ = now;
+ DCHECK(task_queue_manager_delegate_);
+
task_queue_manager_delegate_->PostTask(FROM_HERE, do_work_closure_);
}
« no previous file with comments | « components/scheduler/base/virtual_time_domain.h ('k') | components/scheduler/child/idle_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698