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