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

Unified Diff: components/physical_web/data_source/physical_web_data_source_impl.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/pairing/fake_host_pairing_controller.cc ('k') | components/prefs/default_pref_store.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/physical_web/data_source/physical_web_data_source_impl.cc
diff --git a/components/physical_web/data_source/physical_web_data_source_impl.cc b/components/physical_web/data_source/physical_web_data_source_impl.cc
index 744afcc60d2fe5608d9371ec617d0096d60c6e84..600a2b5e61c069949ca6e1827df3935e71ab3324 100644
--- a/components/physical_web/data_source/physical_web_data_source_impl.cc
+++ b/components/physical_web/data_source/physical_web_data_source_impl.cc
@@ -22,16 +22,18 @@ void PhysicalWebDataSourceImpl::UnregisterListener(
}
void PhysicalWebDataSourceImpl::NotifyOnFound(const std::string& url) {
- FOR_EACH_OBSERVER(PhysicalWebListener, observer_list_, OnFound(url));
+ for (PhysicalWebListener& observer : observer_list_)
+ observer.OnFound(url);
}
void PhysicalWebDataSourceImpl::NotifyOnLost(const std::string& url) {
- FOR_EACH_OBSERVER(PhysicalWebListener, observer_list_, OnLost(url));
+ for (PhysicalWebListener& observer : observer_list_)
+ observer.OnLost(url);
}
void PhysicalWebDataSourceImpl::NotifyOnDistanceChanged(
const std::string& url,
double distance_estimate) {
- FOR_EACH_OBSERVER(PhysicalWebListener, observer_list_,
- OnDistanceChanged(url, distance_estimate));
+ for (PhysicalWebListener& observer : observer_list_)
+ observer.OnDistanceChanged(url, distance_estimate);
}
« no previous file with comments | « components/pairing/fake_host_pairing_controller.cc ('k') | components/prefs/default_pref_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698