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

Unified Diff: components/scheduler/base/task_queue_impl.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.cc ('k') | components/scheduler/base/task_queue_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/scheduler/base/task_queue_impl.h
diff --git a/components/scheduler/base/task_queue_impl.h b/components/scheduler/base/task_queue_impl.h
index aa84639426c4ac5e888402ee7e2cefd962342928..1f130e124eefa9c7a0b59ff9723989c349859351 100644
--- a/components/scheduler/base/task_queue_impl.h
+++ b/components/scheduler/base/task_queue_impl.h
@@ -23,7 +23,7 @@
class SCHEDULER_EXPORT TaskQueueImpl final : public TaskQueue {
public:
TaskQueueImpl(TaskQueueManager* task_queue_manager,
- TimeDomain* time_domain,
+ const scoped_refptr<TimeDomain>& time_domain,
const Spec& spec,
const char* disabled_by_default_tracing_category,
const char* disabled_by_default_verbose_tracing_category);
@@ -70,6 +70,9 @@
bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
const base::Closure& task,
base::TimeDelta delay) override;
+ bool PostDelayedTaskAt(const tracked_objects::Location& from_here,
+ const base::Closure& task,
+ base::TimeTicks desired_run_time) override;
bool IsQueueEnabled() const override;
QueueState GetQueueState() const override;
@@ -79,7 +82,7 @@
void AddTaskObserver(base::MessageLoop::TaskObserver* task_observer) override;
void RemoveTaskObserver(
base::MessageLoop::TaskObserver* task_observer) override;
- void SetTimeDomain(TimeDomain* time_domain) override;
+ void SetTimeDomain(const scoped_refptr<TimeDomain>& time_domain) override;
void UpdateWorkQueue(LazyNow* lazy_now,
bool should_trigger_wakeup,
@@ -151,7 +154,7 @@
struct AnyThread {
AnyThread(TaskQueueManager* task_queue_manager,
PumpPolicy pump_policy,
- TimeDomain* time_domain);
+ const scoped_refptr<TimeDomain>& time_domain);
~AnyThread();
// TaskQueueManager is maintained in two copies: inside AnyThread and inside
@@ -162,7 +165,7 @@
std::queue<Task> incoming_queue;
PumpPolicy pump_policy;
std::priority_queue<Task> delayed_task_queue;
- TimeDomain* time_domain;
+ scoped_refptr<TimeDomain> time_domain;
};
struct MainThreadOnly {
@@ -189,7 +192,7 @@
const base::Closure& task,
base::TimeTicks desired_run_time,
TaskType task_type);
- void ScheduleDelayedWorkTask(TimeDomain* time_domain,
+ void ScheduleDelayedWorkTask(const scoped_refptr<TimeDomain> time_domain,
base::TimeTicks desired_run_time);
// Enqueues any delayed tasks which should be run now on the incoming_queue_.
« no previous file with comments | « components/scheduler/base/task_queue.cc ('k') | components/scheduler/base/task_queue_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698