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

Unified Diff: components/scheduler/base/work_queue.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 | « components/scheduler/base/task_queue_manager.cc ('k') | components/scheduler/base/work_queue.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/scheduler/base/work_queue.h
diff --git a/components/scheduler/base/work_queue.h b/components/scheduler/base/work_queue.h
index 9ff919d7f7e09786db3234d442051723e261685d..c97c34c6a5910bf9f82f4fc6135d2f604a0cfa60 100644
--- a/components/scheduler/base/work_queue.h
+++ b/components/scheduler/base/work_queue.h
@@ -49,11 +49,11 @@ class SCHEDULER_EXPORT WorkQueue {
// Pushes the task onto the |work_queue_| and informs the WorkQueueSets if
// the head changed.
- void Push(const TaskQueueImpl::Task& task);
+ void Push(TaskQueueImpl::Task task);
// Pushes the task onto the |work_queue_|, sets the |enqueue_order| and
// informs the WorkQueueSets if the head changed.
- void PushAndSetEnqueueOrder(const TaskQueueImpl::Task& task,
+ void PushAndSetEnqueueOrder(TaskQueueImpl::Task task,
EnqueueOrder enqueue_order);
// Swap the |work_queue_| with |incoming_queue| and informs the
@@ -88,6 +88,8 @@ class SCHEDULER_EXPORT WorkQueue {
TaskQueueImpl* task_queue_; // NOT OWNED.
size_t work_queue_set_index_;
const char* name_;
+
+ DISALLOW_COPY_AND_ASSIGN(WorkQueue);
};
} // namespace internal
« no previous file with comments | « components/scheduler/base/task_queue_manager.cc ('k') | components/scheduler/base/work_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698