| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "components/storage_monitor/storage_monitor.h" | 10 #include "components/storage_monitor/storage_monitor.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 StorageInfo* device_info) const override; | 38 StorageInfo* device_info) const override; |
| 39 | 39 |
| 40 #if defined(OS_WIN) | 40 #if defined(OS_WIN) |
| 41 virtual bool GetMTPStorageInfoFromDeviceId( | 41 virtual bool GetMTPStorageInfoFromDeviceId( |
| 42 const std::string& storage_device_id, | 42 const std::string& storage_device_id, |
| 43 base::string16* device_location, | 43 base::string16* device_location, |
| 44 base::string16* storage_object_id) const override; | 44 base::string16* storage_object_id) const override; |
| 45 #endif | 45 #endif |
| 46 | 46 |
| 47 #if defined(OS_LINUX) | 47 #if defined(OS_LINUX) |
| 48 virtual device::MediaTransferProtocolManager* | 48 device::MediaTransferProtocolManager* media_transfer_protocol_manager() |
| 49 media_transfer_protocol_manager() override; | 49 override; |
| 50 #endif | 50 #endif |
| 51 | 51 |
| 52 Receiver* receiver() const override; | 52 Receiver* receiver() const override; |
| 53 | 53 |
| 54 void EjectDevice( | 54 void EjectDevice( |
| 55 const std::string& device_id, | 55 const std::string& device_id, |
| 56 base::Callback<void(StorageMonitor::EjectStatus)> callback) override; | 56 base::Callback<void(StorageMonitor::EjectStatus)> callback) override; |
| 57 | 57 |
| 58 const std::string& ejected_device() const { return ejected_device_; } | 58 const std::string& ejected_device() const { return ejected_device_; } |
| 59 | 59 |
| 60 bool init_called() const { return init_called_; } | 60 bool init_called() const { return init_called_; } |
| 61 | 61 |
| 62 private: | 62 private: |
| 63 // Whether TestStorageMonitor::Init() has been called for not. | 63 // Whether TestStorageMonitor::Init() has been called for not. |
| 64 bool init_called_; | 64 bool init_called_; |
| 65 | 65 |
| 66 // The last device to be ejected. | 66 // The last device to be ejected. |
| 67 std::string ejected_device_; | 67 std::string ejected_device_; |
| 68 | 68 |
| 69 #if defined(OS_LINUX) | 69 #if defined(OS_LINUX) |
| 70 scoped_ptr<device::MediaTransferProtocolManager> | 70 scoped_ptr<device::MediaTransferProtocolManager> |
| 71 media_transfer_protocol_manager_; | 71 media_transfer_protocol_manager_; |
| 72 #endif | 72 #endif |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 } // namespace storage_monitor | 75 } // namespace storage_monitor |
| 76 | 76 |
| 77 #endif // COMPONENTS_STORAGE_MONITOR_TEST_STORAGE_MONITOR_H_ | 77 #endif // COMPONENTS_STORAGE_MONITOR_TEST_STORAGE_MONITOR_H_ |
| OLD | NEW |