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

Unified Diff: ui/views/mus/pointer_watcher_event_router.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 | « ui/events/platform/x11/x11_event_source_libevent.cc ('k') | ui/wm/core/compound_event_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/pointer_watcher_event_router.cc
diff --git a/ui/views/mus/pointer_watcher_event_router.cc b/ui/views/mus/pointer_watcher_event_router.cc
index 998c4cf0d61c6f3a77a654c2aae568275a6b4d0c..6d0217b3e6fcfc8bd8ed90878cd07db027da27b2 100644
--- a/ui/views/mus/pointer_watcher_event_router.cc
+++ b/ui/views/mus/pointer_watcher_event_router.cc
@@ -17,14 +17,7 @@ namespace {
bool HasPointerWatcher(
base::ObserverList<views::PointerWatcher, true>* observer_list) {
- if (!observer_list->might_have_observers())
- return false;
-
- // might_have_observers() returned true, see if there really are any
- // observers. The only way to truly know is to use an Iterator and see if it
- // has at least one observer.
- base::ObserverList<PointerWatcher>::Iterator iterator(observer_list);
- return !!iterator.GetNext();
+ return observer_list->begin() != observer_list->end();
}
} // namespace
« no previous file with comments | « ui/events/platform/x11/x11_event_source_libevent.cc ('k') | ui/wm/core/compound_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698