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

Unified Diff: base/task/cancelable_task_tracker.cc

Issue 2791243002: Rewrite base::Bind into base::BindOnce on trivial cases in base (Closed)
Patch Set: rebase Created 3 years, 8 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/synchronization/condition_variable_unittest.cc ('k') | base/task/cancelable_task_tracker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task/cancelable_task_tracker.cc
diff --git a/base/task/cancelable_task_tracker.cc b/base/task/cancelable_task_tracker.cc
index 2a68a57bc6a202edb33a5045299a1b9f7c6023e4..e68b95917aa037cc2bc7d4c4fbe9e6c96faca8fd 100644
--- a/base/task/cancelable_task_tracker.cc
+++ b/base/task/cancelable_task_tracker.cc
@@ -90,9 +90,9 @@ CancelableTaskTracker::TaskId CancelableTaskTracker::PostTaskAndReply(
Closure untrack_closure =
Bind(&CancelableTaskTracker::Untrack, weak_factory_.GetWeakPtr(), id);
bool success = task_runner->PostTaskAndReply(
- from_here, Bind(&RunIfNotCanceled, flag, std::move(task)),
- Bind(&RunIfNotCanceledThenUntrack, base::Owned(flag), std::move(reply),
- std::move(untrack_closure)));
+ from_here, BindOnce(&RunIfNotCanceled, flag, std::move(task)),
+ BindOnce(&RunIfNotCanceledThenUntrack, base::Owned(flag),
+ std::move(reply), std::move(untrack_closure)));
if (!success)
return kBadTaskId;
« no previous file with comments | « base/synchronization/condition_variable_unittest.cc ('k') | base/task/cancelable_task_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698