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

Unified Diff: components/user_prefs/tracked/segregated_pref_store.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
« no previous file with comments | « components/update_client/update_client.cc ('k') | components/variations/service/variations_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/user_prefs/tracked/segregated_pref_store.cc
diff --git a/components/user_prefs/tracked/segregated_pref_store.cc b/components/user_prefs/tracked/segregated_pref_store.cc
index af8dfe34be7b3ab1e17294cf041b572382ba39ef..edb1f2059920bb22706c69c36d2aea5f38fbe3e0 100644
--- a/components/user_prefs/tracked/segregated_pref_store.cc
+++ b/components/user_prefs/tracked/segregated_pref_store.cc
@@ -24,8 +24,8 @@ void SegregatedPrefStore::AggregatingObserver::OnPrefValueChanged(
if (failed_sub_initializations_ + successful_sub_initializations_ < 2)
return;
- FOR_EACH_OBSERVER(PrefStore::Observer, outer_->observers_,
- OnPrefValueChanged(key));
+ for (auto& observer : outer_->observers_)
+ observer.OnPrefValueChanged(key);
}
void SegregatedPrefStore::AggregatingObserver::OnInitializationCompleted(
@@ -44,9 +44,8 @@ void SegregatedPrefStore::AggregatingObserver::OnInitializationCompleted(
outer_->read_error_delegate_->OnError(read_error);
}
- FOR_EACH_OBSERVER(
- PrefStore::Observer, outer_->observers_,
- OnInitializationCompleted(successful_sub_initializations_ == 2));
+ for (auto& observer : outer_->observers_)
+ observer.OnInitializationCompleted(successful_sub_initializations_ == 2);
}
}
« no previous file with comments | « components/update_client/update_client.cc ('k') | components/variations/service/variations_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698