Index: base/bind_helpers.cc |
diff --git a/base/bind_helpers.cc b/base/bind_helpers.cc |
index f2fc3bb0daaed9697a899b2e80f5322e1a074fe9..871eeefc71f04364579e335c31f70cf58746bbae 100644 |
--- a/base/bind_helpers.cc |
+++ b/base/bind_helpers.cc |
@@ -20,6 +20,12 @@ ScopedClosureRunner::~ScopedClosureRunner() { |
closure_.Run(); |
} |
+void ScopedClosureRunner::Reset(const Closure& closure) { |
+ if (!closure_.is_null()) |
awong
2013/08/29 18:57:12
Maybe follow the Release() pattern of caching the
|
+ closure_.Run(); |
+ closure_ = closure; |
+} |
+ |
Closure ScopedClosureRunner::Release() { |
Closure result = closure_; |
closure_.Reset(); |