Index: base/scoped_observer.h |
=================================================================== |
--- base/scoped_observer.h (revision 159993) |
+++ base/scoped_observer.h (working copy) |
@@ -35,6 +35,14 @@ |
source->RemoveObserver(observer_); |
} |
+ bool IsObserving(Source* source) const { |
+ for (size_t i = 0; i < sources_.size(); ++i) { |
+ if (sources_[i] == source) |
+ return true; |
+ } |
+ return false; |
+ } |
+ |
private: |
Observer* observer_; |