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

Unified Diff: base/callback_helpers.h

Issue 2091503004: Add move constructor in ScopedClosureRunner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 6 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 | « no previous file | base/callback_helpers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/callback_helpers.h
diff --git a/base/callback_helpers.h b/base/callback_helpers.h
index 860803989f4b45cf9c55f4a55d0ebcd785bb047e..a425e47ddcb1b54aaf6b3cf90551d498cdf0c7fa 100644
--- a/base/callback_helpers.h
+++ b/base/callback_helpers.h
@@ -27,11 +27,12 @@ base::Callback<Sig> ResetAndReturn(base::Callback<Sig>* cb) {
return ret;
}
-// ScopedClosureRunner is akin to scoped_ptr for Closures. It ensures that the
-// Closure is executed and deleted no matter how the current scope exits.
+// ScopedClosureRunner is akin to std::unique_ptr<> for Closures. It ensures
+// that theClosure is executed no matter how the current scope exits.
danakj 2016/06/23 20:19:28 the Closure
Sergey Ulanov 2016/06/23 23:30:32 Done.
class BASE_EXPORT ScopedClosureRunner {
public:
ScopedClosureRunner();
+ ScopedClosureRunner(ScopedClosureRunner&& other);
danakj 2016/06/23 20:19:28 Any reason you're not defining operator= along wit
Sergey Ulanov 2016/06/23 23:30:32 One small concern I have with operator= is that wh
danakj 2016/06/24 20:06:30 I think it makes sense that it does what reset doe
Sergey Ulanov 2016/06/24 23:44:01 Done. BTW, As far as I can tell there is only one
explicit ScopedClosureRunner(const Closure& closure);
~ScopedClosureRunner();
« no previous file with comments | « no previous file | base/callback_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698