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 #ifndef CHROMEOS_DISKS_MOCK_DISK_MOUNT_MANAGER_H_ | 5 #ifndef CHROMEOS_DISKS_MOCK_DISK_MOUNT_MANAGER_H_ |
6 #define CHROMEOS_DISKS_MOCK_DISK_MOUNT_MANAGER_H_ | 6 #define CHROMEOS_DISKS_MOCK_DISK_MOUNT_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
| 11 #include "chromeos/dbus/cros_disks_client.h" |
11 #include "chromeos/disks/disk_mount_manager.h" | 12 #include "chromeos/disks/disk_mount_manager.h" |
12 #include "testing/gmock/include/gmock/gmock.h" | 13 #include "testing/gmock/include/gmock/gmock.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
14 | 15 |
15 namespace chromeos { | 16 namespace chromeos { |
16 namespace disks { | 17 namespace disks { |
17 | 18 |
18 class MockDiskMountManager : public DiskMountManager { | 19 class MockDiskMountManager : public DiskMountManager { |
19 public: | 20 public: |
20 MockDiskMountManager(); | 21 MockDiskMountManager(); |
(...skipping 24 matching lines...) Expand all Loading... |
45 void NotifyDeviceRemoveEvents(); | 46 void NotifyDeviceRemoveEvents(); |
46 | 47 |
47 // Sets up default results for mock methods. | 48 // Sets up default results for mock methods. |
48 void SetupDefaultReplies(); | 49 void SetupDefaultReplies(); |
49 | 50 |
50 // Creates a fake disk entry for the mounted device. This function is | 51 // Creates a fake disk entry for the mounted device. This function is |
51 // primarily for RemovableDeviceNotificationsTest. | 52 // primarily for RemovableDeviceNotificationsTest. |
52 void CreateDiskEntryForMountDevice( | 53 void CreateDiskEntryForMountDevice( |
53 const DiskMountManager::MountPointInfo& mount_info, | 54 const DiskMountManager::MountPointInfo& mount_info, |
54 const std::string& device_id, | 55 const std::string& device_id, |
55 const std::string& device_label); | 56 const std::string& device_label, |
| 57 const std::string& vendor_name, |
| 58 const std::string& product_name, |
| 59 DeviceType device_type, |
| 60 uint64 total_size_in_bytes); |
56 | 61 |
57 // Removes the fake disk entry associated with the mounted device. This | 62 // Removes the fake disk entry associated with the mounted device. This |
58 // function is primarily for RemovableDeviceNotificationsTest. | 63 // function is primarily for RemovableDeviceNotificationsTest. |
59 void RemoveDiskEntryForMountDevice( | 64 void RemoveDiskEntryForMountDevice( |
60 const DiskMountManager::MountPointInfo& mount_info); | 65 const DiskMountManager::MountPointInfo& mount_info); |
61 | 66 |
62 private: | 67 private: |
63 // Is used to implement AddObserver. | 68 // Is used to implement AddObserver. |
64 void AddObserverInternal(DiskMountManager::Observer* observer); | 69 void AddObserverInternal(DiskMountManager::Observer* observer); |
65 | 70 |
(...skipping 26 matching lines...) Expand all Loading... |
92 // The list of existing mount points. | 97 // The list of existing mount points. |
93 DiskMountManager::MountPointMap mount_points_; | 98 DiskMountManager::MountPointMap mount_points_; |
94 | 99 |
95 DISALLOW_COPY_AND_ASSIGN(MockDiskMountManager); | 100 DISALLOW_COPY_AND_ASSIGN(MockDiskMountManager); |
96 }; | 101 }; |
97 | 102 |
98 } // namespace disks | 103 } // namespace disks |
99 } // namespace chromeos | 104 } // namespace chromeos |
100 | 105 |
101 #endif // CHROMEOS_DISKS_MOCK_DISK_MOUNT_MANAGER_H_ | 106 #endif // CHROMEOS_DISKS_MOCK_DISK_MOUNT_MANAGER_H_ |
OLD | NEW |