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

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

Issue 1477353002: Revert of Move throttling of background timers into the renderer scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/task_queue_impl.cc ('k') | components/scheduler/base/task_queue_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/scheduler/base/task_queue_manager.h
diff --git a/components/scheduler/base/task_queue_manager.h b/components/scheduler/base/task_queue_manager.h
index f7090bd8dbc9016375a1429027db17deb97f65ce..f6af85453b2f412a5aaa209f432c2855b684f752 100644
--- a/components/scheduler/base/task_queue_manager.h
+++ b/components/scheduler/base/task_queue_manager.h
@@ -100,10 +100,12 @@
const scoped_refptr<TaskQueueManagerDelegate>& delegate() const;
// Time domains must be registered for the task queues to get updated.
- void RegisterTimeDomain(TimeDomain* time_domain);
- void UnregisterTimeDomain(TimeDomain* time_domain);
-
- RealTimeDomain* real_time_domain() const { return real_time_domain_.get(); }
+ void RegisterTimeDomain(const scoped_refptr<TimeDomain>& time_domain);
+ void UnregisterTimeDomain(const scoped_refptr<TimeDomain>& time_domain);
+
+ const scoped_refptr<RealTimeDomain>& real_time_domain() const {
+ return real_time_domain_;
+ }
private:
friend class LazyNow;
@@ -174,8 +176,8 @@
AsValueWithSelectorResult(bool should_run,
internal::TaskQueueImpl* selected_queue) const;
- std::set<TimeDomain*> time_domains_;
- scoped_ptr<RealTimeDomain> real_time_domain_;
+ std::set<scoped_refptr<TimeDomain>> time_domains_;
+ scoped_refptr<RealTimeDomain> real_time_domain_;
std::set<scoped_refptr<internal::TaskQueueImpl>> queues_;
@@ -210,6 +212,7 @@
Observer* observer_; // NOT OWNED
scoped_refptr<DeletionSentinel> deletion_sentinel_;
+ scoped_refptr<TimeDomain> time_domain_;
base::WeakPtrFactory<TaskQueueManager> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(TaskQueueManager);
« no previous file with comments | « components/scheduler/base/task_queue_impl.cc ('k') | components/scheduler/base/task_queue_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698