Index: base/task_scheduler/post_task.cc |
diff --git a/base/task_scheduler/post_task.cc b/base/task_scheduler/post_task.cc |
index 0781e85920c586bf23b62e8d8d8b043fb77511e7..6f9adae27f4cc3312928d773a522058761e7ea32 100644 |
--- a/base/task_scheduler/post_task.cc |
+++ b/base/task_scheduler/post_task.cc |
@@ -21,7 +21,7 @@ class PostTaskAndReplyTaskRunner : public internal::PostTaskAndReplyImpl { |
private: |
bool PostTask(const tracked_objects::Location& from_here, |
- Closure task) override { |
+ OnceClosure task) override { |
PostTaskWithTraits(from_here, traits_, std::move(task)); |
return true; |
} |
@@ -32,43 +32,43 @@ class PostTaskAndReplyTaskRunner : public internal::PostTaskAndReplyImpl { |
} // namespace |
-void PostTask(const tracked_objects::Location& from_here, Closure task) { |
+void PostTask(const tracked_objects::Location& from_here, OnceClosure task) { |
PostDelayedTask(from_here, std::move(task), TimeDelta()); |
} |
void PostDelayedTask(const tracked_objects::Location& from_here, |
- Closure task, |
+ OnceClosure task, |
TimeDelta delay) { |
PostDelayedTaskWithTraits(from_here, TaskTraits(), std::move(task), delay); |
} |
void PostTaskAndReply(const tracked_objects::Location& from_here, |
- Closure task, |
- Closure reply) { |
+ OnceClosure task, |
+ OnceClosure reply) { |
PostTaskWithTraitsAndReply(from_here, TaskTraits(), std::move(task), |
std::move(reply)); |
} |
void PostTaskWithTraits(const tracked_objects::Location& from_here, |
const TaskTraits& traits, |
- Closure task) { |
+ OnceClosure task) { |
PostDelayedTaskWithTraits(from_here, traits, std::move(task), TimeDelta()); |
} |
void PostDelayedTaskWithTraits(const tracked_objects::Location& from_here, |
const TaskTraits& traits, |
- Closure task, |
+ OnceClosure task, |
TimeDelta delay) { |
DCHECK(TaskScheduler::GetInstance()) |
<< "Ref. Prerequisite section of post_task.h"; |
TaskScheduler::GetInstance()->PostDelayedTaskWithTraits( |
- from_here, traits, std::move(task), delay); |
+ from_here, traits, std::move(task), std::move(delay)); |
} |
void PostTaskWithTraitsAndReply(const tracked_objects::Location& from_here, |
const TaskTraits& traits, |
- Closure task, |
- Closure reply) { |
+ OnceClosure task, |
+ OnceClosure reply) { |
PostTaskAndReplyTaskRunner(traits).PostTaskAndReply( |
from_here, std::move(task), std::move(reply)); |
} |