Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1258)

Unified Diff: content/browser/notification_service_impl.cc

Issue 23190045: Switch ObserverList::size() to ObserverList::might_have_observers() Pt.1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pure merge Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/media/webrtc_internals.cc ('k') | media/base/user_input_monitor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/notification_service_impl.cc
diff --git a/content/browser/notification_service_impl.cc b/content/browser/notification_service_impl.cc
index 49132883f18bd7e36026556fde2639a5e17beb1e..27de8579fe8f639120754cdc768f1a0a2955470e 100644
--- a/content/browser/notification_service_impl.cc
+++ b/content/browser/notification_service_impl.cc
@@ -83,7 +83,7 @@ void NotificationServiceImpl::RemoveObserver(NotificationObserver* observer,
observers_[type][source.map_key()];
if (observer_list) {
observer_list->RemoveObserver(observer);
- if (!observer_list->size()) {
+ if (!observer_list->might_have_observers()) {
observers_[type].erase(source.map_key());
delete observer_list;
}
« no previous file with comments | « content/browser/media/webrtc_internals.cc ('k') | media/base/user_input_monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698