Index: base/callback_helpers.cc |
diff --git a/base/callback_helpers.cc b/base/callback_helpers.cc |
index 8fd3dde6ca49089e9e4cc66e0089706f902ae678..bcd2396a04040a837a595eb455ec927c65ea1a9d 100644 |
--- a/base/callback_helpers.cc |
+++ b/base/callback_helpers.cc |
@@ -5,6 +5,7 @@ |
#include "base/callback_helpers.h" |
#include "base/callback.h" |
+#include "base/logging.h" |
namespace base { |
@@ -23,17 +24,18 @@ ScopedClosureRunner::ScopedClosureRunner(ScopedClosureRunner&& other) |
ScopedClosureRunner& ScopedClosureRunner::operator=( |
ScopedClosureRunner&& other) { |
- Reset(other.Release()); |
+ DCHECK(closure_.is_null()); |
+ ReplaceClosure(other.Release()); |
return *this; |
} |
-void ScopedClosureRunner::Reset() { |
+void ScopedClosureRunner::RunNow() { |
Closure old_closure = Release(); |
if (!old_closure.is_null()) |
old_closure.Run(); |
} |
-void ScopedClosureRunner::Reset(const Closure& closure) { |
+void ScopedClosureRunner::ReplaceClosure(const Closure& closure) { |
Closure old_closure = Release(); |
closure_ = closure; |
if (!old_closure.is_null()) |