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

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

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/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 f6af85453b2f412a5aaa209f432c2855b684f752..f7090bd8dbc9016375a1429027db17deb97f65ce 100644
--- a/components/scheduler/base/task_queue_manager.h
+++ b/components/scheduler/base/task_queue_manager.h
@@ -100,12 +100,10 @@ class SCHEDULER_EXPORT TaskQueueManager
const scoped_refptr<TaskQueueManagerDelegate>& delegate() const;
// Time domains must be registered for the task queues to get updated.
- void RegisterTimeDomain(const scoped_refptr<TimeDomain>& time_domain);
- void UnregisterTimeDomain(const scoped_refptr<TimeDomain>& time_domain);
+ void RegisterTimeDomain(TimeDomain* time_domain);
+ void UnregisterTimeDomain(TimeDomain* time_domain);
- const scoped_refptr<RealTimeDomain>& real_time_domain() const {
- return real_time_domain_;
- }
+ RealTimeDomain* real_time_domain() const { return real_time_domain_.get(); }
private:
friend class LazyNow;
@@ -176,8 +174,8 @@ class SCHEDULER_EXPORT TaskQueueManager
AsValueWithSelectorResult(bool should_run,
internal::TaskQueueImpl* selected_queue) const;
- std::set<scoped_refptr<TimeDomain>> time_domains_;
- scoped_refptr<RealTimeDomain> real_time_domain_;
+ std::set<TimeDomain*> time_domains_;
+ scoped_ptr<RealTimeDomain> real_time_domain_;
std::set<scoped_refptr<internal::TaskQueueImpl>> queues_;
@@ -212,7 +210,6 @@ class SCHEDULER_EXPORT TaskQueueManager
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