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

Unified Diff: components/drive/drive_notification_manager.cc

Issue 2421083002: Replace FOR_EACH_OBSERVER in components/drive with range-based for (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/drive/drive_app_registry.cc ('k') | components/drive/job_scheduler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/drive/drive_notification_manager.cc
diff --git a/components/drive/drive_notification_manager.cc b/components/drive/drive_notification_manager.cc
index 14e076828220dbc82dfd7c22b3918a6a7f7a7d44..6bd991e77c084551bf57ca68084d4c9192024297 100644
--- a/components/drive/drive_notification_manager.cc
+++ b/components/drive/drive_notification_manager.cc
@@ -61,8 +61,8 @@ void DriveNotificationManager::OnInvalidatorStateChange(
} else {
DVLOG(1) << "XMPP Notifications disabled (state=" << state << ")";
}
- FOR_EACH_OBSERVER(DriveNotificationObserver, observers_,
- OnPushNotificationEnabled(push_notification_enabled_));
+ for (auto& observer : observers_)
+ observer.OnPushNotificationEnabled(push_notification_enabled_);
}
void DriveNotificationManager::OnIncomingInvalidation(
@@ -110,8 +110,8 @@ void DriveNotificationManager::RestartPollingTimer() {
void DriveNotificationManager::NotifyObserversToUpdate(
NotificationSource source) {
DVLOG(1) << "Notifying observers: " << NotificationSourceToString(source);
- FOR_EACH_OBSERVER(DriveNotificationObserver, observers_,
- OnNotificationReceived());
+ for (auto& observer : observers_)
+ observer.OnNotificationReceived();
if (!observers_notified_) {
UMA_HISTOGRAM_BOOLEAN("Drive.PushNotificationInitiallyEnabled",
push_notification_enabled_);
« no previous file with comments | « components/drive/drive_app_registry.cc ('k') | components/drive/job_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698