Chromium Code Reviews

Unified Diff: base/sequenced_task_runner.cc

Issue 2726523002: Pass Callback to TaskRunner by value and consume it on invocation (1) (Closed)
Patch Set: erase Closure* Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « base/sequenced_task_runner.h ('k') | base/task_runner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/sequenced_task_runner.cc
diff --git a/base/sequenced_task_runner.cc b/base/sequenced_task_runner.cc
index dc11ebc3f12dac57c39c9ec079618f7c5018666d..fa19ae50c146c6578cf1fedb05ee9bd879123008 100644
--- a/base/sequenced_task_runner.cc
+++ b/base/sequenced_task_runner.cc
@@ -4,14 +4,17 @@
#include "base/sequenced_task_runner.h"
+#include <utility>
+
#include "base/bind.h"
namespace base {
bool SequencedTaskRunner::PostNonNestableTask(
const tracked_objects::Location& from_here,
- const Closure& task) {
- return PostNonNestableDelayedTask(from_here, task, base::TimeDelta());
+ Closure task) {
+ return PostNonNestableDelayedTask(from_here, std::move(task),
+ base::TimeDelta());
}
bool SequencedTaskRunner::DeleteOrReleaseSoonInternal(
« no previous file with comments | « base/sequenced_task_runner.h ('k') | base/task_runner.h » ('j') | no next file with comments »

Powered by Google App Engine