Index: base/task_scheduler/task.cc |
diff --git a/base/task_scheduler/task.cc b/base/task_scheduler/task.cc |
index bf3bbbd5c19d041acc197ac7c114cadcc8f43996..44aaa6016ddda0a159f8c39660246dae63390990 100644 |
--- a/base/task_scheduler/task.cc |
+++ b/base/task_scheduler/task.cc |
@@ -4,20 +4,22 @@ |
#include "base/task_scheduler/task.h" |
+#include <utility> |
+ |
#include "base/critical_closure.h" |
namespace base { |
namespace internal { |
Task::Task(const tracked_objects::Location& posted_from, |
- const Closure& task, |
+ Closure task, |
const TaskTraits& traits, |
TimeDelta delay) |
: PendingTask( |
posted_from, |
traits.shutdown_behavior() == TaskShutdownBehavior::BLOCK_SHUTDOWN |
- ? MakeCriticalClosure(task) |
- : task, |
+ ? MakeCriticalClosure(std::move(task)) |
+ : std::move(task), |
delay.is_zero() ? TimeTicks() : TimeTicks::Now() + delay, |
false), // Not nestable. |
// Prevent a delayed BLOCK_SHUTDOWN task from blocking shutdown before |