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

Unified Diff: base/callback_helpers.h

Issue 2513363003: repro for crbug.com/663886
Patch Set: Created 4 years, 1 month 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/callback_forward.h ('k') | 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 782371f6e71703059aeb6a4022a1aee785f1ad2d..de7f2ac83079ddad3339966150e9cca4a9876fe7 100644
--- a/base/callback_helpers.h
+++ b/base/callback_helpers.h
@@ -31,27 +31,26 @@ base::Callback<Sig> ResetAndReturn(base::Callback<Sig>* cb) {
// that the Closure is executed no matter how the current scope exits.
class BASE_EXPORT ScopedClosureRunner {
public:
- ScopedClosureRunner();
- explicit ScopedClosureRunner(const Closure& closure);
- ~ScopedClosureRunner();
+ ScopedClosureRunner() {}
+ explicit ScopedClosureRunner(const Closure& closure) {}
+ ~ScopedClosureRunner() {}
- ScopedClosureRunner(ScopedClosureRunner&& other);
+ ScopedClosureRunner(ScopedClosureRunner&& other) {}
// Releases the current closure if it's set and replaces it with the closure
// from |other|.
- ScopedClosureRunner& operator=(ScopedClosureRunner&& other);
+ ScopedClosureRunner& operator=(ScopedClosureRunner&& other) {return *this;}
// Calls the current closure and resets it, so it wont be called again.
- void RunAndReset();
+ void RunAndReset() {}
// Replaces closure with the new one releasing the old one without calling it.
- void ReplaceClosure(const Closure& closure);
+ void ReplaceClosure(const Closure& closure) {}
// Releases the Closure without calling.
- Closure Release() WARN_UNUSED_RESULT;
+ Closure Release() WARN_UNUSED_RESULT {return Closure();}
private:
- Closure closure_;
DISALLOW_COPY_AND_ASSIGN(ScopedClosureRunner);
};
« no previous file with comments | « base/callback_forward.h ('k') | base/callback_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698