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

Unified Diff: extensions/browser/extension_pref_value_map.cc

Issue 2424593002: Reduce FOR_EACH_OBSERVER usage in extensions (Closed)
Patch Set: script_observers_ 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 | « extensions/browser/extension_icon_image.cc ('k') | extensions/browser/extension_prefs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/extension_pref_value_map.cc
diff --git a/extensions/browser/extension_pref_value_map.cc b/extensions/browser/extension_pref_value_map.cc
index 4b00bf8bb0dec304dcffcfb802f155c52d211841..68c5c61271684674cad6c5bfd3bacdccdea99e20 100644
--- a/extensions/browser/extension_pref_value_map.cc
+++ b/extensions/browser/extension_pref_value_map.cc
@@ -378,8 +378,8 @@ std::string ExtensionPrefValueMap::GetExtensionControllingPref(
}
void ExtensionPrefValueMap::NotifyInitializationCompleted() {
- FOR_EACH_OBSERVER(ExtensionPrefValueMap::Observer, observers_,
- OnInitializationCompleted());
+ for (auto& observer : observers_)
+ observer.OnInitializationCompleted();
}
void ExtensionPrefValueMap::NotifyPrefValueChanged(
@@ -389,11 +389,11 @@ void ExtensionPrefValueMap::NotifyPrefValueChanged(
}
void ExtensionPrefValueMap::NotifyPrefValueChanged(const std::string& key) {
- FOR_EACH_OBSERVER(ExtensionPrefValueMap::Observer, observers_,
- OnPrefValueChanged(key));
+ for (auto& observer : observers_)
+ observer.OnPrefValueChanged(key);
}
void ExtensionPrefValueMap::NotifyOfDestruction() {
- FOR_EACH_OBSERVER(ExtensionPrefValueMap::Observer, observers_,
- OnExtensionPrefValueMapDestruction());
+ for (auto& observer : observers_)
+ observer.OnExtensionPrefValueMapDestruction();
}
« no previous file with comments | « extensions/browser/extension_icon_image.cc ('k') | extensions/browser/extension_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698