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

Unified Diff: components/variations/service/variations_service.cc

Issue 2430823002: Reduce usage of FOR_EACH_OBSERVER macro in components/ (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
Index: components/variations/service/variations_service.cc
diff --git a/components/variations/service/variations_service.cc b/components/variations/service/variations_service.cc
index 8f5d5df8efa9dd05531706b0d24c1e4728aca493..6b95b26f6e63d91c85a0c0a52095e7a96b12adb4 100644
--- a/components/variations/service/variations_service.cc
+++ b/components/variations/service/variations_service.cc
@@ -626,11 +626,11 @@ void VariationsService::NotifyObservers(
DCHECK(thread_checker_.CalledOnValidThread());
if (result.kill_critical_group_change_count > 0) {
- FOR_EACH_OBSERVER(Observer, observer_list_,
- OnExperimentChangesDetected(Observer::CRITICAL));
+ for (auto& observer : observer_list_)
+ observer.OnExperimentChangesDetected(Observer::CRITICAL);
} else if (result.kill_best_effort_group_change_count > 0) {
- FOR_EACH_OBSERVER(Observer, observer_list_,
- OnExperimentChangesDetected(Observer::BEST_EFFORT));
+ for (auto& observer : observer_list_)
+ observer.OnExperimentChangesDetected(Observer::BEST_EFFORT);
}
}
« no previous file with comments | « components/user_prefs/tracked/segregated_pref_store.cc ('k') | components/wallpaper/wallpaper_manager_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698