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

Unified Diff: chromeos/disks/disk_mount_manager.cc

Issue 2413963002: Replace FOR_EACH_OBSERVER in chromeos/ with range-based for (Closed)
Patch Set: Run the script again with '/mg' 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 | « chromeos/dbus/update_engine_client.cc ('k') | chromeos/disks/mock_disk_mount_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/disks/disk_mount_manager.cc
diff --git a/chromeos/disks/disk_mount_manager.cc b/chromeos/disks/disk_mount_manager.cc
index 8f94af3f83204dab19b86e5929b45995f18890d7..c5d373743f87a8321a9ddde9fd01bf3da4978b98 100644
--- a/chromeos/disks/disk_mount_manager.cc
+++ b/chromeos/disks/disk_mount_manager.cc
@@ -608,28 +608,30 @@ class DiskMountManagerImpl : public DiskMountManager {
// Notifies all observers about disk status update.
void NotifyDiskStatusUpdate(DiskEvent event,
const Disk* disk) {
- FOR_EACH_OBSERVER(Observer, observers_, OnDiskEvent(event, disk));
+ for (auto& observer : observers_)
+ observer.OnDiskEvent(event, disk);
}
// Notifies all observers about device status update.
void NotifyDeviceStatusUpdate(DeviceEvent event,
const std::string& device_path) {
- FOR_EACH_OBSERVER(Observer, observers_, OnDeviceEvent(event, device_path));
+ for (auto& observer : observers_)
+ observer.OnDeviceEvent(event, device_path);
}
// Notifies all observers about mount completion.
void NotifyMountStatusUpdate(MountEvent event,
MountError error_code,
const MountPointInfo& mount_info) {
- FOR_EACH_OBSERVER(Observer, observers_,
- OnMountEvent(event, error_code, mount_info));
+ for (auto& observer : observers_)
+ observer.OnMountEvent(event, error_code, mount_info);
}
void NotifyFormatStatusUpdate(FormatEvent event,
FormatError error_code,
const std::string& device_path) {
- FOR_EACH_OBSERVER(Observer, observers_,
- OnFormatEvent(event, error_code, device_path));
+ for (auto& observer : observers_)
+ observer.OnFormatEvent(event, error_code, device_path);
}
// Finds system path prefix from |system_path|.
« no previous file with comments | « chromeos/dbus/update_engine_client.cc ('k') | chromeos/disks/mock_disk_mount_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698