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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 EXPECT_CALL(*this, disks()) | 159 EXPECT_CALL(*this, disks()) |
160 .WillRepeatedly(ReturnRef(disks_)); | 160 .WillRepeatedly(ReturnRef(disks_)); |
161 EXPECT_CALL(*this, mount_points()) | 161 EXPECT_CALL(*this, mount_points()) |
162 .WillRepeatedly(ReturnRef(mount_points_)); | 162 .WillRepeatedly(ReturnRef(mount_points_)); |
163 EXPECT_CALL(*this, FindDiskBySourcePath(_)) | 163 EXPECT_CALL(*this, FindDiskBySourcePath(_)) |
164 .Times(AnyNumber()); | 164 .Times(AnyNumber()); |
165 EXPECT_CALL(*this, RequestMountInfoRefresh()) | 165 EXPECT_CALL(*this, RequestMountInfoRefresh()) |
166 .Times(AnyNumber()); | 166 .Times(AnyNumber()); |
167 EXPECT_CALL(*this, MountPath(_, _, _, _)) | 167 EXPECT_CALL(*this, MountPath(_, _, _, _)) |
168 .Times(AnyNumber()); | 168 .Times(AnyNumber()); |
169 EXPECT_CALL(*this, UnmountPath(_, _)) | 169 EXPECT_CALL(*this, UnmountPath(_, _, _)) |
170 .Times(AnyNumber()); | 170 .Times(AnyNumber()); |
171 EXPECT_CALL(*this, FormatMountedDevice(_)) | 171 EXPECT_CALL(*this, FormatMountedDevice(_)) |
172 .Times(AnyNumber()); | 172 .Times(AnyNumber()); |
173 EXPECT_CALL(*this, UnmountDeviceRecursively(_, _)) | 173 EXPECT_CALL(*this, UnmountDeviceRecursively(_, _)) |
174 .Times(AnyNumber()); | 174 .Times(AnyNumber()); |
175 } | 175 } |
176 | 176 |
177 void MockDiskMountManager::CreateDiskEntryForMountDevice( | 177 void MockDiskMountManager::CreateDiskEntryForMountDevice( |
178 const DiskMountManager::MountPointInfo& mount_info, | 178 const DiskMountManager::MountPointInfo& mount_info, |
179 const std::string& device_id, | 179 const std::string& device_id, |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 FOR_EACH_OBSERVER(Observer, observers_, OnDiskEvent(event, disk)); | 237 FOR_EACH_OBSERVER(Observer, observers_, OnDiskEvent(event, disk)); |
238 } | 238 } |
239 | 239 |
240 void MockDiskMountManager::NotifyDeviceChanged(DeviceEvent event, | 240 void MockDiskMountManager::NotifyDeviceChanged(DeviceEvent event, |
241 const std::string& path) { | 241 const std::string& path) { |
242 FOR_EACH_OBSERVER(Observer, observers_, OnDeviceEvent(event, path)); | 242 FOR_EACH_OBSERVER(Observer, observers_, OnDeviceEvent(event, path)); |
243 } | 243 } |
244 | 244 |
245 } // namespace disks | 245 } // namespace disks |
246 } // namespace chromeos | 246 } // namespace chromeos |
OLD | NEW |