Index: base/observer_list_threadsafe.h |
diff --git a/base/observer_list_threadsafe.h b/base/observer_list_threadsafe.h |
index e4204941949ff5996383b9906d916eca1322e85d..db4e6d2151ff2fa315604725e9a7657cb6caade7 100644 |
--- a/base/observer_list_threadsafe.h |
+++ b/base/observer_list_threadsafe.h |
@@ -111,11 +111,11 @@ class ObserverListThreadSafe |
// Add an observer to the list. An observer should not be added to |
// the same list more than once. |
- void AddObserver(ObserverType* obs) { |
+ bool AddObserver(ObserverType* obs) { |
// If there is not a current MessageLoop, it is impossible to notify on it, |
// so do not add the observer. |
if (!MessageLoop::current()) |
- return; |
+ return false; |
ObserverList<ObserverType>* list = nullptr; |
PlatformThreadId thread_id = PlatformThread::CurrentId(); |
@@ -126,6 +126,7 @@ class ObserverListThreadSafe |
list = &(observer_lists_[thread_id]->list); |
} |
list->AddObserver(obs); |
+ return true; |
} |
// Remove an observer from the list if it is in the list. |