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

Side by Side Diff: chromeos/disks/mock_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 unified diff | Download patch
« no previous file with comments | « chromeos/disks/disk_mount_manager.cc ('k') | chromeos/login/login_state.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chromeos/disks/mock_disk_mount_manager.h" 5 #include "chromeos/disks/mock_disk_mount_manager.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 211
212 void MockDiskMountManager::EnsureMountInfoRefreshedInternal( 212 void MockDiskMountManager::EnsureMountInfoRefreshedInternal(
213 const EnsureMountInfoRefreshedCallback& callback, 213 const EnsureMountInfoRefreshedCallback& callback,
214 bool force) { 214 bool force) {
215 callback.Run(true); 215 callback.Run(true);
216 } 216 }
217 217
218 void MockDiskMountManager::NotifyDiskChanged( 218 void MockDiskMountManager::NotifyDiskChanged(
219 DiskEvent event, 219 DiskEvent event,
220 const DiskMountManager::Disk* disk) { 220 const DiskMountManager::Disk* disk) {
221 FOR_EACH_OBSERVER(Observer, observers_, OnDiskEvent(event, disk)); 221 for (auto& observer : observers_)
222 observer.OnDiskEvent(event, disk);
222 } 223 }
223 224
224 void MockDiskMountManager::NotifyDeviceChanged(DeviceEvent event, 225 void MockDiskMountManager::NotifyDeviceChanged(DeviceEvent event,
225 const std::string& path) { 226 const std::string& path) {
226 FOR_EACH_OBSERVER(Observer, observers_, OnDeviceEvent(event, path)); 227 for (auto& observer : observers_)
228 observer.OnDeviceEvent(event, path);
227 } 229 }
228 230
229 } // namespace disks 231 } // namespace disks
230 } // namespace chromeos 232 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/disks/disk_mount_manager.cc ('k') | chromeos/login/login_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698