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

Unified Diff: ui/base/win/osk_display_manager.cc

Issue 2419673003: Remove base::ObserverList<T>::Iter::GetNext(). (Closed)
Patch Set: ios fix too 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
« base/observer_list_unittest.cc ('K') | « ios/web/web_state/web_state_impl.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/win/osk_display_manager.cc
diff --git a/ui/base/win/osk_display_manager.cc b/ui/base/win/osk_display_manager.cc
index 251f59c83832be35bd23db239c7d4fda82dd69c0..c3abb9fc567eee070fbef9e5a39168bd1e56b875 100644
--- a/ui/base/win/osk_display_manager.cc
+++ b/ui/base/win/osk_display_manager.cc
@@ -237,11 +237,8 @@ void OnScreenKeyboardDetector::HandleKeyboardHidden() {
}
void OnScreenKeyboardDetector::ClearObservers() {
- base::ObserverListBase<OnScreenKeyboardObserver>::Iterator iter(&observers_);
- for (OnScreenKeyboardObserver* observer = iter.GetNext(); observer;
- observer = iter.GetNext()) {
- RemoveObserver(observer);
- }
+ for (auto& observer : observers_)
+ RemoveObserver(&observer);
}
// OnScreenKeyboardDisplayManager member definitions.
« base/observer_list_unittest.cc ('K') | « ios/web/web_state/web_state_impl.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698