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

Unified Diff: base/callback_helpers.h

Issue 2094803005: Fix PrepareTextureCopyOutputResult to avoid ScopedCallbackRunner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_closure_runner
Patch Set: . Created 4 years, 5 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 c4b0d867634751fbc3e0dfa3a4b0b7177def79e8..782371f6e71703059aeb6a4022a1aee785f1ad2d 100644
--- a/base/callback_helpers.h
+++ b/base/callback_helpers.h
@@ -37,15 +37,15 @@ class BASE_EXPORT ScopedClosureRunner {
ScopedClosureRunner(ScopedClosureRunner&& other);
- // Calls the current closure if it's set and replaces it with the closure from
- // |other|.
+ // Releases the current closure if it's set and replaces it with the closure
+ // from |other|.
ScopedClosureRunner& operator=(ScopedClosureRunner&& other);
// Calls the current closure and resets it, so it wont be called again.
- void Reset();
+ void RunAndReset();
- // Calls the current closure and replaces it with the new one.
- void Reset(const Closure& closure);
+ // Replaces closure with the new one releasing the old one without calling it.
+ void ReplaceClosure(const Closure& closure);
// Releases the Closure without calling.
Closure Release() WARN_UNUSED_RESULT;
« 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