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

Unified Diff: base/task_scheduler/task.cc

Issue 2122543002: Replace Closure in TaskRunner::PostTask with OneShotCallback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@07_oneshot
Patch Set: fix Created 4 years, 3 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 | « base/task_scheduler/task.h ('k') | base/task_scheduler/task_scheduler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task_scheduler/task.cc
diff --git a/base/task_scheduler/task.cc b/base/task_scheduler/task.cc
index 8a589a202186dc2b3404c234e104a856ca57d8dd..14aa9f347f4035f5e65b91038279d672c20b6852 100644
--- a/base/task_scheduler/task.cc
+++ b/base/task_scheduler/task.cc
@@ -8,11 +8,11 @@ namespace base {
namespace internal {
Task::Task(const tracked_objects::Location& posted_from,
- const Closure& task,
+ OnceClosure task,
const TaskTraits& traits,
const TimeDelta& delay)
: PendingTask(posted_from,
- task,
+ std::move(task),
delay.is_zero() ? TimeTicks() : TimeTicks::Now() + delay,
false), // Not nestable.
traits(traits) {}
« no previous file with comments | « base/task_scheduler/task.h ('k') | base/task_scheduler/task_scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698