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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 EXPECT_CALL(*this, FormatUnmountedDevice(_)) | 175 EXPECT_CALL(*this, FormatUnmountedDevice(_)) |
176 .Times(AnyNumber()); | 176 .Times(AnyNumber()); |
177 EXPECT_CALL(*this, FormatMountedDevice(_)) | 177 EXPECT_CALL(*this, FormatMountedDevice(_)) |
178 .Times(AnyNumber()); | 178 .Times(AnyNumber()); |
179 EXPECT_CALL(*this, UnmountDeviceRecursive(_, _, _)) | 179 EXPECT_CALL(*this, UnmountDeviceRecursive(_, _, _)) |
180 .Times(AnyNumber()); | 180 .Times(AnyNumber()); |
181 } | 181 } |
182 | 182 |
183 void MockDiskMountManager::CreateDiskEntryForMountDevice( | 183 void MockDiskMountManager::CreateDiskEntryForMountDevice( |
184 const DiskMountManager::MountPointInfo& mount_info, | 184 const DiskMountManager::MountPointInfo& mount_info, |
185 const std::string& device_id) { | 185 const std::string& device_id, |
| 186 const std::string& device_label) { |
186 Disk* disk = new DiskMountManager::Disk(std::string(mount_info.source_path), | 187 Disk* disk = new DiskMountManager::Disk(std::string(mount_info.source_path), |
187 std::string(mount_info.mount_path), | 188 std::string(mount_info.mount_path), |
188 std::string(), // system_path | 189 std::string(), // system_path |
189 std::string(), // file_path | 190 std::string(), // file_path |
190 std::string(), // device_label | 191 device_label, // device_label |
191 std::string(), // drive_label | 192 std::string(), // drive_label |
192 std::string(), // vendor_id | 193 std::string(), // vendor_id |
193 std::string(), // vendor_name | 194 std::string(), // vendor_name |
194 std::string(), // product_id | 195 std::string(), // product_id |
195 std::string(), // product_name | 196 std::string(), // product_name |
196 device_id, // fs_uuid | 197 device_id, // fs_uuid |
197 std::string(), // system_path_prefix | 198 std::string(), // system_path_prefix |
198 DEVICE_TYPE_USB, // device_type | 199 DEVICE_TYPE_USB, // device_type |
199 1073741824, // total_size_in_bytes | 200 1073741824, // total_size_in_bytes |
200 false, // is_parent | 201 false, // is_parent |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 FOR_EACH_OBSERVER(Observer, observers_, DiskChanged(event, disk)); | 239 FOR_EACH_OBSERVER(Observer, observers_, DiskChanged(event, disk)); |
239 } | 240 } |
240 | 241 |
241 void MockDiskMountManager::NotifyDeviceChanged(DiskMountManagerEventType event, | 242 void MockDiskMountManager::NotifyDeviceChanged(DiskMountManagerEventType event, |
242 const std::string& path) { | 243 const std::string& path) { |
243 FOR_EACH_OBSERVER(Observer, observers_, DeviceChanged(event, path)); | 244 FOR_EACH_OBSERVER(Observer, observers_, DeviceChanged(event, path)); |
244 } | 245 } |
245 | 246 |
246 } // namespace disks | 247 } // namespace disks |
247 } // namespace chromeos | 248 } // namespace chromeos |
OLD | NEW |