| 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> |
| 8 |
| 7 #include <utility> | 9 #include <utility> |
| 8 | 10 |
| 9 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
| 10 #include "base/stl_util.h" | 12 #include "base/stl_util.h" |
| 11 #include "base/strings/string_util.h" | 13 #include "base/strings/string_util.h" |
| 12 | 14 |
| 13 using testing::_; | 15 using testing::_; |
| 14 using testing::AnyNumber; | 16 using testing::AnyNumber; |
| 15 using testing::Invoke; | 17 using testing::Invoke; |
| 16 using testing::ReturnRef; | 18 using testing::ReturnRef; |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 .Times(AnyNumber()); | 181 .Times(AnyNumber()); |
| 180 } | 182 } |
| 181 | 183 |
| 182 void MockDiskMountManager::CreateDiskEntryForMountDevice( | 184 void MockDiskMountManager::CreateDiskEntryForMountDevice( |
| 183 const DiskMountManager::MountPointInfo& mount_info, | 185 const DiskMountManager::MountPointInfo& mount_info, |
| 184 const std::string& device_id, | 186 const std::string& device_id, |
| 185 const std::string& device_label, | 187 const std::string& device_label, |
| 186 const std::string& vendor_name, | 188 const std::string& vendor_name, |
| 187 const std::string& product_name, | 189 const std::string& product_name, |
| 188 DeviceType device_type, | 190 DeviceType device_type, |
| 189 uint64 total_size_in_bytes, | 191 uint64_t total_size_in_bytes, |
| 190 bool is_parent, | 192 bool is_parent, |
| 191 bool has_media, | 193 bool has_media, |
| 192 bool on_boot_device, | 194 bool on_boot_device, |
| 193 bool on_removable_device) { | 195 bool on_removable_device) { |
| 194 Disk* disk = new DiskMountManager::Disk(mount_info.source_path, | 196 Disk* disk = new DiskMountManager::Disk(mount_info.source_path, |
| 195 mount_info.mount_path, | 197 mount_info.mount_path, |
| 196 std::string(), // system_path | 198 std::string(), // system_path |
| 197 mount_info.source_path, | 199 mount_info.source_path, |
| 198 device_label, | 200 device_label, |
| 199 std::string(), // drive_label | 201 std::string(), // drive_label |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 FOR_EACH_OBSERVER(Observer, observers_, OnDiskEvent(event, disk)); | 255 FOR_EACH_OBSERVER(Observer, observers_, OnDiskEvent(event, disk)); |
| 254 } | 256 } |
| 255 | 257 |
| 256 void MockDiskMountManager::NotifyDeviceChanged(DeviceEvent event, | 258 void MockDiskMountManager::NotifyDeviceChanged(DeviceEvent event, |
| 257 const std::string& path) { | 259 const std::string& path) { |
| 258 FOR_EACH_OBSERVER(Observer, observers_, OnDeviceEvent(event, path)); | 260 FOR_EACH_OBSERVER(Observer, observers_, OnDeviceEvent(event, path)); |
| 259 } | 261 } |
| 260 | 262 |
| 261 } // namespace disks | 263 } // namespace disks |
| 262 } // namespace chromeos | 264 } // namespace chromeos |
| OLD | NEW |