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

Unified Diff: ui/aura/window.cc

Issue 2414863002: Remove usage of base::ObserverList<T>::Iter::GetNext() in //ui. (Closed)
Patch Set: debrace 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 | ui/compositor/layer_animation_sequence.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window.cc
diff --git a/ui/aura/window.cc b/ui/aura/window.cc
index d92078768d12c4d114c7178ac53db7372da53c33..c8860525d1223a517fe8258bd39ea5d1134d6614 100644
--- a/ui/aura/window.cc
+++ b/ui/aura/window.cc
@@ -144,11 +144,9 @@ Window::~Window() {
if (delegate_)
delegate_->OnWindowDestroyed(this);
- base::ObserverListBase<WindowObserver>::Iterator iter(&observers_);
- for (WindowObserver* observer = iter.GetNext(); observer;
- observer = iter.GetNext()) {
- RemoveObserver(observer);
- observer->OnWindowDestroyed(this);
+ for (WindowObserver& observer : observers_) {
+ RemoveObserver(&observer);
+ observer.OnWindowDestroyed(this);
}
// Delete the LayoutManager before properties. This way if the LayoutManager
« no previous file with comments | « no previous file | ui/compositor/layer_animation_sequence.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698