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

Unified Diff: services/ui/ws/user_id_tracker.cc

Issue 2424613002: Remove usage of FOR_EACH_OBSERVER macro in services/ (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 | « services/ui/ws/server_window.cc ('k') | services/ui/ws/window_manager_window_tree_factory_set.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/user_id_tracker.cc
diff --git a/services/ui/ws/user_id_tracker.cc b/services/ui/ws/user_id_tracker.cc
index 3b3e198462ce26586ab62f5bf13d6786d952e96d..f547b5893113cdacd599dc18796888ceeb0b7aa5 100644
--- a/services/ui/ws/user_id_tracker.cc
+++ b/services/ui/ws/user_id_tracker.cc
@@ -28,8 +28,8 @@ void UserIdTracker::SetActiveUserId(const UserId& id) {
const UserId previously_active_id = active_id_;
active_id_ = id;
- FOR_EACH_OBSERVER(UserIdTrackerObserver, observers_,
- OnActiveUserIdChanged(previously_active_id, id));
+ for (auto& observer : observers_)
+ observer.OnActiveUserIdChanged(previously_active_id, id);
}
void UserIdTracker::AddUserId(const UserId& id) {
@@ -37,13 +37,15 @@ void UserIdTracker::AddUserId(const UserId& id) {
return;
ids_.insert(id);
- FOR_EACH_OBSERVER(UserIdTrackerObserver, observers_, OnUserIdAdded(id));
+ for (auto& observer : observers_)
+ observer.OnUserIdAdded(id);
}
void UserIdTracker::RemoveUserId(const UserId& id) {
DCHECK(IsValidUserId(id));
ids_.erase(id);
- FOR_EACH_OBSERVER(UserIdTrackerObserver, observers_, OnUserIdRemoved(id));
+ for (auto& observer : observers_)
+ observer.OnUserIdRemoved(id);
}
void UserIdTracker::AddObserver(UserIdTrackerObserver* observer) {
« no previous file with comments | « services/ui/ws/server_window.cc ('k') | services/ui/ws/window_manager_window_tree_factory_set.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698