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

Unified Diff: net/dns/mdns_client_impl.cc

Issue 2423713002: Remove usage of FOR_EACH_OBSERVER macro in net (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 | « net/cert/sth_distributor.cc ('k') | net/log/net_log.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/mdns_client_impl.cc
diff --git a/net/dns/mdns_client_impl.cc b/net/dns/mdns_client_impl.cc
index 634822e83fc03080890f11c945f44894b11bd2bf..bd4b0d117b0f3ba4d5589d553a6e56a37090376d 100644
--- a/net/dns/mdns_client_impl.cc
+++ b/net/dns/mdns_client_impl.cc
@@ -323,7 +323,8 @@ void MDnsClientImpl::Core::NotifyNsecRecord(const RecordParsed* record) {
listeners_.upper_bound(ListenerKey(record->name(), 0));
for (; i != listeners_.end() && i->first.first == record->name(); i++) {
if (!rdata->GetBit(i->first.second)) {
- FOR_EACH_OBSERVER(MDnsListenerImpl, *i->second, AlertNsecRecord());
+ for (auto& observer : *i->second)
+ observer.AlertNsecRecord();
}
}
}
@@ -340,8 +341,8 @@ void MDnsClientImpl::Core::AlertListeners(
ListenerMap::iterator listener_map_iterator = listeners_.find(key);
if (listener_map_iterator == listeners_.end()) return;
- FOR_EACH_OBSERVER(MDnsListenerImpl, *listener_map_iterator->second,
- HandleRecordUpdate(update_type, record));
+ for (auto& observer : *listener_map_iterator->second)
+ observer.HandleRecordUpdate(update_type, record);
}
void MDnsClientImpl::Core::AddListener(
« no previous file with comments | « net/cert/sth_distributor.cc ('k') | net/log/net_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698