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

Unified Diff: chrome/browser/local_discovery/service_discovery_client_mdns.cc

Issue 2439493002: Reduce usage of FOR_EACH_OBSERVER macro in chrome/browser (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 | « chrome/browser/lifetime/keep_alive_registry.cc ('k') | chrome/browser/memory/tab_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/local_discovery/service_discovery_client_mdns.cc
diff --git a/chrome/browser/local_discovery/service_discovery_client_mdns.cc b/chrome/browser/local_discovery/service_discovery_client_mdns.cc
index cb8ff2e7f4fb9fee2a17f739bf13b332727131d1..7e7ca7fed50f0b1124fe04c4904327bcfe9f759a 100644
--- a/chrome/browser/local_discovery/service_discovery_client_mdns.cc
+++ b/chrome/browser/local_discovery/service_discovery_client_mdns.cc
@@ -426,7 +426,8 @@ void ServiceDiscoveryClientMdns::OnMdnsInitialized(bool success) {
// Initialization is done, no need to delay tasks.
need_dalay_mdns_tasks_ = false;
- FOR_EACH_OBSERVER(Proxy, proxies_, OnNewMdnsReady());
+ for (Proxy& observer : proxies_)
+ observer.OnNewMdnsReady();
}
void ServiceDiscoveryClientMdns::ReportSuccess() {
@@ -438,7 +439,8 @@ void ServiceDiscoveryClientMdns::ReportSuccess() {
void ServiceDiscoveryClientMdns::OnBeforeMdnsDestroy() {
need_dalay_mdns_tasks_ = true;
weak_ptr_factory_.InvalidateWeakPtrs();
- FOR_EACH_OBSERVER(Proxy, proxies_, OnMdnsDestroy());
+ for (Proxy& observer : proxies_)
+ observer.OnMdnsDestroy();
}
void ServiceDiscoveryClientMdns::DestroyMdns() {
« no previous file with comments | « chrome/browser/lifetime/keep_alive_registry.cc ('k') | chrome/browser/memory/tab_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698