| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |