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

Unified Diff: components/prefs/pref_notifier_impl.cc

Issue 2415793002: Remove usage of base::ObserverList<T>::Iter::GetNext() in //components/prefs. (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | components/prefs/pref_notifier_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/prefs/pref_notifier_impl.cc
diff --git a/components/prefs/pref_notifier_impl.cc b/components/prefs/pref_notifier_impl.cc
index 48dd57c22d20eae537736bc4aee73bb2951b797e..a5e8e9846aeab3cb21d5d665a88ba06c441a5356 100644
--- a/components/prefs/pref_notifier_impl.cc
+++ b/components/prefs/pref_notifier_impl.cc
@@ -19,10 +19,8 @@ PrefNotifierImpl::~PrefNotifierImpl() {
// Verify that there are no pref observers when we shut down.
for (const auto& observer_list : pref_observers_) {
- PrefObserverList::Iterator obs_iterator(observer_list.second.get());
- if (obs_iterator.GetNext()) {
+ if (observer_list.second->begin() != observer_list.second->end())
Pam (message me for reviews) 2016/10/14 20:35:26 Why not observer_list.second->size() ?
dcheng 2016/10/14 20:38:40 size() isn't exposed by ObserverList. Since Observ
LOG(WARNING) << "Pref observer found at shutdown.";
- }
}
// Same for initialization observers.
« no previous file with comments | « no previous file | components/prefs/pref_notifier_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698