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

Unified Diff: components/ntp_snippets/offline_pages/offline_page_proxy.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
Index: components/ntp_snippets/offline_pages/offline_page_proxy.cc
diff --git a/components/ntp_snippets/offline_pages/offline_page_proxy.cc b/components/ntp_snippets/offline_pages/offline_page_proxy.cc
index 4e3f17212ce39bf166e07340fce7e51e0e8562a8..81976ad82ab025b6341131d8c2673762e94cdf77 100644
--- a/components/ntp_snippets/offline_pages/offline_page_proxy.cc
+++ b/components/ntp_snippets/offline_pages/offline_page_proxy.cc
@@ -49,8 +49,8 @@ void OfflinePageProxy::OfflinePageModelChanged(OfflinePageModel* model) {
void OfflinePageProxy::OfflinePageDeleted(
int64_t offline_id,
const offline_pages::ClientId& client_id) {
- FOR_EACH_OBSERVER(Observer, observers_,
- OfflinePageDeleted(offline_id, client_id));
+ for (Observer& observer : observers_)
+ observer.OfflinePageDeleted(offline_id, client_id);
}
void OfflinePageProxy::FetchOfflinePagesAndNotify() {
@@ -60,7 +60,8 @@ void OfflinePageProxy::FetchOfflinePagesAndNotify() {
void OfflinePageProxy::OnOfflinePagesLoaded(
const MultipleOfflinePageItemResult& result) {
- FOR_EACH_OBSERVER(Observer, observers_, OfflinePageModelChanged(result));
+ for (Observer& observer : observers_)
+ observer.OfflinePageModelChanged(result);
}
} // namespace ntp_snippets
« no previous file with comments | « components/ntp_snippets/content_suggestions_service.cc ('k') | components/offline_pages/background/request_coordinator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698