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

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

Issue 1886453003: Make PendingTask move-only and pass it by value on retaining params (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mac test fix Created 4 years, 5 months 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 | « base/threading/worker_pool_posix.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 69fd02e854927f58d4b7ac2b09fa6d1217134b53..3508c623abfe9f3e6c8154bca6be2f260245ce8e 100644
--- a/components/scheduler/base/task_queue_impl.h
+++ b/components/scheduler/base/task_queue_impl.h
@@ -220,14 +220,14 @@ class SCHEDULER_EXPORT TaskQueueImpl final : public TaskQueue {
// Push the task onto the |delayed_incoming_queue|. Lock-free main thread
// only fast path.
- void PushOntoDelayedIncomingQueueFromMainThread(const Task& pending_task,
+ void PushOntoDelayedIncomingQueueFromMainThread(Task pending_task,
base::TimeTicks now);
// Push the task onto the |delayed_incoming_queue|. Slow path from other
// threads.
- void PushOntoDelayedIncomingQueueLocked(const Task& pending_task);
+ void PushOntoDelayedIncomingQueueLocked(Task pending_task);
- void ScheduleDelayedWorkTask(const Task& pending_task);
+ void ScheduleDelayedWorkTask(Task pending_task);
// Enqueues any delayed tasks which should be run now on the
// |delayed_work_queue|. Must be called from the main thread.
@@ -257,7 +257,7 @@ class SCHEDULER_EXPORT TaskQueueImpl final : public TaskQueue {
// Push the task onto the |immediate_incoming_queue| and for auto pumped
// queues it calls MaybePostDoWorkOnMainRunner if the Incoming queue was
// empty.
- void PushOntoImmediateIncomingQueueLocked(const Task& pending_task);
+ void PushOntoImmediateIncomingQueueLocked(Task pending_task);
void TraceQueueSize(bool is_locked) const;
static void QueueAsValueInto(const std::queue<Task>& queue,
« no previous file with comments | « base/threading/worker_pool_posix.cc ('k') | components/scheduler/base/task_queue_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698