| Index: base/pending_task.cc
|
| diff --git a/base/pending_task.cc b/base/pending_task.cc
|
| index c0999bab5f325f215b02ba025598f17b0abd84fb..73834bd46071ab61c0f902b599497a72a494c35c 100644
|
| --- a/base/pending_task.cc
|
| +++ b/base/pending_task.cc
|
| @@ -9,9 +9,9 @@
|
| namespace base {
|
|
|
| PendingTask::PendingTask(const tracked_objects::Location& posted_from,
|
| - const base::Closure& task)
|
| + base::Closure task)
|
| : base::TrackingInfo(posted_from, TimeTicks()),
|
| - task(task),
|
| + task(std::move(task)),
|
| posted_from(posted_from),
|
| sequence_num(0),
|
| nestable(true),
|
| @@ -19,22 +19,24 @@ PendingTask::PendingTask(const tracked_objects::Location& posted_from,
|
| }
|
|
|
| PendingTask::PendingTask(const tracked_objects::Location& posted_from,
|
| - const base::Closure& task,
|
| + base::Closure task,
|
| TimeTicks delayed_run_time,
|
| bool nestable)
|
| : base::TrackingInfo(posted_from, delayed_run_time),
|
| - task(task),
|
| + task(std::move(task)),
|
| posted_from(posted_from),
|
| sequence_num(0),
|
| nestable(nestable),
|
| is_high_res(false) {
|
| }
|
|
|
| -PendingTask::PendingTask(const PendingTask& other) = default;
|
| +PendingTask::PendingTask(PendingTask&& other) = default;
|
|
|
| PendingTask::~PendingTask() {
|
| }
|
|
|
| +PendingTask& PendingTask::operator=(PendingTask&& other) = default;
|
| +
|
| bool PendingTask::operator<(const PendingTask& other) const {
|
| // Since the top of a priority queue is defined as the "greatest" element, we
|
| // need to invert the comparison here. We want the smaller time to be at the
|
|
|