Index: base/task_scheduler/task.cc |
diff --git a/base/task_scheduler/task.cc b/base/task_scheduler/task.cc |
index 3780c16dcb71ceff67da3611d4c9c260e641aa76..1fc84eb7e69fcced0fe844f831d7329a25be2b2c 100644 |
--- a/base/task_scheduler/task.cc |
+++ b/base/task_scheduler/task.cc |
@@ -4,22 +4,23 @@ |
#include "base/task_scheduler/task.h" |
+#include <utility> |
+ |
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, |
- task, |
+ std::move(task), |
delay.is_zero() ? TimeTicks() : TimeTicks::Now() + delay, |
false), // Not nestable. |
// Prevent a delayed BLOCK_SHUTDOWN task from blocking shutdown before |
// being scheduled by changing its shutdown behavior to SKIP_ON_SHUTDOWN. |
- traits(!delay.is_zero() && |
- traits.shutdown_behavior() == |
- TaskShutdownBehavior::BLOCK_SHUTDOWN |
+ traits(!delay.is_zero() && traits.shutdown_behavior() == |
+ TaskShutdownBehavior::BLOCK_SHUTDOWN |
? TaskTraits(traits).WithShutdownBehavior( |
TaskShutdownBehavior::SKIP_ON_SHUTDOWN) |
: traits), |