Index: base/callback_helpers.cc |
diff --git a/base/callback_helpers.cc b/base/callback_helpers.cc |
index 8fd3dde6ca49089e9e4cc66e0089706f902ae678..838e6c8d849526076de0a72a63df5feda0c6e0cb 100644 |
--- a/base/callback_helpers.cc |
+++ b/base/callback_helpers.cc |
@@ -23,21 +23,18 @@ ScopedClosureRunner::ScopedClosureRunner(ScopedClosureRunner&& other) |
ScopedClosureRunner& ScopedClosureRunner::operator=( |
ScopedClosureRunner&& other) { |
- Reset(other.Release()); |
+ ReplaceClosure(other.Release()); |
return *this; |
} |
-void ScopedClosureRunner::Reset() { |
+void ScopedClosureRunner::RunAndReset() { |
Closure old_closure = Release(); |
if (!old_closure.is_null()) |
old_closure.Run(); |
} |
-void ScopedClosureRunner::Reset(const Closure& closure) { |
- Closure old_closure = Release(); |
+void ScopedClosureRunner::ReplaceClosure(const Closure& closure) { |
closure_ = closure; |
- if (!old_closure.is_null()) |
- old_closure.Run(); |
} |
Closure ScopedClosureRunner::Release() { |