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

Unified Diff: chrome/browser/chromeos/system/automatic_reboot_manager.cc

Issue 2416763002: Replace FOR_EACH_OBSERVER in c/b/chromeos 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
Index: chrome/browser/chromeos/system/automatic_reboot_manager.cc
diff --git a/chrome/browser/chromeos/system/automatic_reboot_manager.cc b/chrome/browser/chromeos/system/automatic_reboot_manager.cc
index 08f5aacc93f5bdc92d46ca35adc78ad6d16f5a0f..c5359a070bbcca7d8428ebd3b1d60d74fcebc6a6 100644
--- a/chrome/browser/chromeos/system/automatic_reboot_manager.cc
+++ b/chrome/browser/chromeos/system/automatic_reboot_manager.cc
@@ -200,9 +200,8 @@ AutomaticRebootManager::AutomaticRebootManager(
}
AutomaticRebootManager::~AutomaticRebootManager() {
- FOR_EACH_OBSERVER(AutomaticRebootManagerObserver,
- observers_,
- WillDestroyAutomaticRebootManager());
+ for (auto& observer : observers_)
+ observer.WillDestroyAutomaticRebootManager();
DBusThreadManager* dbus_thread_manager = DBusThreadManager::Get();
dbus_thread_manager->GetPowerManagerClient()->RemoveObserver(this);
@@ -384,9 +383,8 @@ void AutomaticRebootManager::RequestReboot() {
reboot_requested_ = true;
DCHECK_NE(AutomaticRebootManagerObserver::REBOOT_REASON_UNKNOWN,
reboot_reason_);
- FOR_EACH_OBSERVER(AutomaticRebootManagerObserver,
- observers_,
- OnRebootRequested(reboot_reason_));
+ for (auto& observer : observers_)
+ observer.OnRebootRequested(reboot_reason_);
MaybeReboot(false);
}

Powered by Google App Engine
This is Rietveld 408576698