| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_STORAGE_MONITOR_TEST_STORAGE_MONITOR_H_ | 5 #ifndef COMPONENTS_STORAGE_MONITOR_TEST_STORAGE_MONITOR_H_ |
| 6 #define COMPONENTS_STORAGE_MONITOR_TEST_STORAGE_MONITOR_H_ | 6 #define COMPONENTS_STORAGE_MONITOR_TEST_STORAGE_MONITOR_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 bool GetStorageInfoForPath(const base::FilePath& path, | 39 bool GetStorageInfoForPath(const base::FilePath& path, |
| 40 StorageInfo* device_info) const override; | 40 StorageInfo* device_info) const override; |
| 41 | 41 |
| 42 #if defined(OS_WIN) | 42 #if defined(OS_WIN) |
| 43 bool GetMTPStorageInfoFromDeviceId( | 43 bool GetMTPStorageInfoFromDeviceId( |
| 44 const std::string& storage_device_id, | 44 const std::string& storage_device_id, |
| 45 base::string16* device_location, | 45 base::string16* device_location, |
| 46 base::string16* storage_object_id) const override; | 46 base::string16* storage_object_id) const override; |
| 47 #endif | 47 #endif |
| 48 | 48 |
| 49 #if defined(OS_LINUX) | 49 #if defined(OS_CHROMEOS) |
| 50 device::MediaTransferProtocolManager* media_transfer_protocol_manager() | 50 device::MediaTransferProtocolManager* media_transfer_protocol_manager() |
| 51 override; | 51 override; |
| 52 #endif | 52 #endif |
| 53 | 53 |
| 54 Receiver* receiver() const override; | 54 Receiver* receiver() const override; |
| 55 | 55 |
| 56 void EjectDevice( | 56 void EjectDevice( |
| 57 const std::string& device_id, | 57 const std::string& device_id, |
| 58 base::Callback<void(StorageMonitor::EjectStatus)> callback) override; | 58 base::Callback<void(StorageMonitor::EjectStatus)> callback) override; |
| 59 | 59 |
| 60 const std::string& ejected_device() const { return ejected_device_; } | 60 const std::string& ejected_device() const { return ejected_device_; } |
| 61 | 61 |
| 62 void AddRemovablePath(const base::FilePath& path); | 62 void AddRemovablePath(const base::FilePath& path); |
| 63 | 63 |
| 64 bool init_called() const { return init_called_; } | 64 bool init_called() const { return init_called_; } |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 // Whether TestStorageMonitor::Init() has been called for not. | 67 // Whether TestStorageMonitor::Init() has been called for not. |
| 68 bool init_called_; | 68 bool init_called_; |
| 69 | 69 |
| 70 // The last device to be ejected. | 70 // The last device to be ejected. |
| 71 std::string ejected_device_; | 71 std::string ejected_device_; |
| 72 | 72 |
| 73 // Paths considered for testing purposes to be on removable storage. | 73 // Paths considered for testing purposes to be on removable storage. |
| 74 std::vector<base::FilePath> removable_paths_; | 74 std::vector<base::FilePath> removable_paths_; |
| 75 | 75 |
| 76 #if defined(OS_LINUX) | 76 #if defined(OS_CHROMEOS) |
| 77 std::unique_ptr<device::MediaTransferProtocolManager> | 77 std::unique_ptr<device::MediaTransferProtocolManager> |
| 78 media_transfer_protocol_manager_; | 78 media_transfer_protocol_manager_; |
| 79 #endif | 79 #endif |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 } // namespace storage_monitor | 82 } // namespace storage_monitor |
| 83 | 83 |
| 84 #endif // COMPONENTS_STORAGE_MONITOR_TEST_STORAGE_MONITOR_H_ | 84 #endif // COMPONENTS_STORAGE_MONITOR_TEST_STORAGE_MONITOR_H_ |
| OLD | NEW |