| 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" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 // Invokes fake device insert events. | 43 // Invokes fake device insert events. |
| 44 void NotifyDeviceInsertEvents(); | 44 void NotifyDeviceInsertEvents(); |
| 45 | 45 |
| 46 // Invokes fake device remove events. | 46 // Invokes fake device remove events. |
| 47 void NotifyDeviceRemoveEvents(); | 47 void NotifyDeviceRemoveEvents(); |
| 48 | 48 |
| 49 // Sets up default results for mock methods. | 49 // Sets up default results for mock methods. |
| 50 void SetupDefaultReplies(); | 50 void SetupDefaultReplies(); |
| 51 | 51 |
| 52 // Creates a fake disk entry for the mounted device. This function is | 52 // Creates a fake disk entry for the mounted device. This function is |
| 53 // primarily for RemovableDeviceNotificationsTest. | 53 // primarily for StorageMonitorTest. |
| 54 void CreateDiskEntryForMountDevice( | 54 void CreateDiskEntryForMountDevice( |
| 55 const DiskMountManager::MountPointInfo& mount_info, | 55 const DiskMountManager::MountPointInfo& mount_info, |
| 56 const std::string& device_id, | 56 const std::string& device_id, |
| 57 const std::string& device_label, | 57 const std::string& device_label, |
| 58 const std::string& vendor_name, | 58 const std::string& vendor_name, |
| 59 const std::string& product_name, | 59 const std::string& product_name, |
| 60 DeviceType device_type, | 60 DeviceType device_type, |
| 61 uint64 total_size_in_bytes); | 61 uint64 total_size_in_bytes); |
| 62 | 62 |
| 63 // Removes the fake disk entry associated with the mounted device. This | 63 // Removes the fake disk entry associated with the mounted device. This |
| 64 // function is primarily for RemovableDeviceNotificationsTest. | 64 // function is primarily for StorageMonitorTest. |
| 65 void RemoveDiskEntryForMountDevice( | 65 void RemoveDiskEntryForMountDevice( |
| 66 const DiskMountManager::MountPointInfo& mount_info); | 66 const DiskMountManager::MountPointInfo& mount_info); |
| 67 | 67 |
| 68 private: | 68 private: |
| 69 // Is used to implement AddObserver. | 69 // Is used to implement AddObserver. |
| 70 void AddObserverInternal(DiskMountManager::Observer* observer); | 70 void AddObserverInternal(DiskMountManager::Observer* observer); |
| 71 | 71 |
| 72 // Is used to implement RemoveObserver. | 72 // Is used to implement RemoveObserver. |
| 73 void RemoveObserverInternal(DiskMountManager::Observer* observer); | 73 void RemoveObserverInternal(DiskMountManager::Observer* observer); |
| 74 | 74 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 98 // The list of existing mount points. | 98 // The list of existing mount points. |
| 99 DiskMountManager::MountPointMap mount_points_; | 99 DiskMountManager::MountPointMap mount_points_; |
| 100 | 100 |
| 101 DISALLOW_COPY_AND_ASSIGN(MockDiskMountManager); | 101 DISALLOW_COPY_AND_ASSIGN(MockDiskMountManager); |
| 102 }; | 102 }; |
| 103 | 103 |
| 104 } // namespace disks | 104 } // namespace disks |
| 105 } // namespace chromeos | 105 } // namespace chromeos |
| 106 | 106 |
| 107 #endif // CHROMEOS_DISKS_MOCK_DISK_MOUNT_MANAGER_H_ | 107 #endif // CHROMEOS_DISKS_MOCK_DISK_MOUNT_MANAGER_H_ |
| OLD | NEW |