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

Unified Diff: base/critical_closure_internal_ios.mm

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. 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/critical_closure.h ('k') | base/deferred_sequenced_task_runner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/critical_closure_internal_ios.mm
diff --git a/base/critical_closure_internal_ios.mm b/base/critical_closure_internal_ios.mm
index 063d3dd9a24e08b22dc3847d5f3a1da39a3cd265..4088a471735e164cded6baf66c6fef8ae9388372 100644
--- a/base/critical_closure_internal_ios.mm
+++ b/base/critical_closure_internal_ios.mm
@@ -13,7 +13,8 @@ bool IsMultiTaskingSupported() {
return [[UIDevice currentDevice] isMultitaskingSupported];
}
-CriticalClosure::CriticalClosure(const Closure& closure) : closure_(closure) {}
+CriticalClosure::CriticalClosure(Closure closure)
+ : closure_(std::move(closure)) {}
CriticalClosure::~CriticalClosure() {}
« no previous file with comments | « base/critical_closure.h ('k') | base/deferred_sequenced_task_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698