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

Unified Diff: components/prefs/testing_pref_store.cc

Issue 2444753002: 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/prefs/pref_notifier_impl.cc ('k') | components/prefs/value_map_pref_store.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/prefs/testing_pref_store.cc
diff --git a/components/prefs/testing_pref_store.cc b/components/prefs/testing_pref_store.cc
index 2060c9fdcec25098eb06f112bfa87ffcccf8b414..1e775824a6a9ba1b7a3e6b7673f4b7ea24a7eaff 100644
--- a/components/prefs/testing_pref_store.cc
+++ b/components/prefs/testing_pref_store.cc
@@ -99,7 +99,8 @@ void TestingPrefStore::SetInitializationCompleted() {
}
void TestingPrefStore::NotifyPrefValueChanged(const std::string& key) {
- FOR_EACH_OBSERVER(Observer, observers_, OnPrefValueChanged(key));
+ for (Observer& observer : observers_)
+ observer.OnPrefValueChanged(key);
}
void TestingPrefStore::NotifyInitializationCompleted() {
@@ -107,13 +108,14 @@ void TestingPrefStore::NotifyInitializationCompleted() {
init_complete_ = true;
if (read_success_ && read_error_ != PREF_READ_ERROR_NONE && error_delegate_)
error_delegate_->OnError(read_error_);
- FOR_EACH_OBSERVER(
- Observer, observers_, OnInitializationCompleted(read_success_));
+ for (Observer& observer : observers_)
+ observer.OnInitializationCompleted(read_success_);
}
void TestingPrefStore::ReportValueChanged(const std::string& key,
uint32_t flags) {
- FOR_EACH_OBSERVER(Observer, observers_, OnPrefValueChanged(key));
+ for (Observer& observer : observers_)
+ observer.OnPrefValueChanged(key);
}
void TestingPrefStore::SetString(const std::string& key,
« no previous file with comments | « components/prefs/pref_notifier_impl.cc ('k') | components/prefs/value_map_pref_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698