| Index: base/callback_helpers.cc
|
| diff --git a/base/callback_helpers.cc b/base/callback_helpers.cc
|
| index 838e6c8d849526076de0a72a63df5feda0c6e0cb..2ab95592f0526e0a1589ff3d21e0ac1bd2333c82 100644
|
| --- a/base/callback_helpers.cc
|
| +++ b/base/callback_helpers.cc
|
| @@ -7,40 +7,4 @@
|
| #include "base/callback.h"
|
|
|
| namespace base {
|
| -
|
| -ScopedClosureRunner::ScopedClosureRunner() {}
|
| -
|
| -ScopedClosureRunner::ScopedClosureRunner(const Closure& closure)
|
| - : closure_(closure) {}
|
| -
|
| -ScopedClosureRunner::~ScopedClosureRunner() {
|
| - if (!closure_.is_null())
|
| - closure_.Run();
|
| -}
|
| -
|
| -ScopedClosureRunner::ScopedClosureRunner(ScopedClosureRunner&& other)
|
| - : closure_(other.Release()) {}
|
| -
|
| -ScopedClosureRunner& ScopedClosureRunner::operator=(
|
| - ScopedClosureRunner&& other) {
|
| - ReplaceClosure(other.Release());
|
| - return *this;
|
| -}
|
| -
|
| -void ScopedClosureRunner::RunAndReset() {
|
| - Closure old_closure = Release();
|
| - if (!old_closure.is_null())
|
| - old_closure.Run();
|
| -}
|
| -
|
| -void ScopedClosureRunner::ReplaceClosure(const Closure& closure) {
|
| - closure_ = closure;
|
| -}
|
| -
|
| -Closure ScopedClosureRunner::Release() {
|
| - Closure result = closure_;
|
| - closure_.Reset();
|
| - return result;
|
| -}
|
| -
|
| } // namespace base
|
|
|