Chromium Code Reviews| 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 CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_STORAGE_NOTIFICATIONS_H_ | 5 #ifndef CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_STORAGE_NOTIFICATIONS_H_ |
| 6 #define CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_STORAGE_NOTIFICATIONS_H_ | 6 #define CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_STORAGE_NOTIFICATIONS_H_ |
| 7 | 7 |
| 8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
| 9 #include "base/system_monitor/system_monitor.h" | 9 #include "base/system_monitor/system_monitor.h" |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 23 // Finds the device that contains |path| and populates |device_info|. | 23 // Finds the device that contains |path| and populates |device_info|. |
| 24 // Should be able to handle any path on the local system, not just removable | 24 // Should be able to handle any path on the local system, not just removable |
| 25 // storage. Returns false if unable to find the device. | 25 // storage. Returns false if unable to find the device. |
| 26 virtual bool GetDeviceInfoForPath( | 26 virtual bool GetDeviceInfoForPath( |
| 27 const FilePath& path, | 27 const FilePath& path, |
| 28 base::SystemMonitor::RemovableStorageInfo* device_info) const = 0; | 28 base::SystemMonitor::RemovableStorageInfo* device_info) const = 0; |
| 29 | 29 |
| 30 // Returns the storage size of the device present at |location|. If the | 30 // Returns the storage size of the device present at |location|. If the |
| 31 // device information is unavailable, returns zero. | 31 // device information is unavailable, returns zero. |
| 32 virtual uint64 GetStorageSize(const std::string& location) const = 0; | 32 virtual uint64 GetStorageSize(const std::string& location) const = 0; |
| 33 | |
| 34 #if defined(OS_WIN) | |
| 35 // Gets the MTP device storage information specified by |storage_device_id|. | |
| 36 // On success, returns true and fills in |device_location| with device | |
| 37 // interface details and |storage_object_id| with storage object temporary | |
|
Lei Zhang
2013/01/14 20:49:02
Both here and in portable_device_watcher_win.h, yo
kmadhusu
2013/01/15 19:08:17
Done.
| |
| 38 // identifier. | |
| 39 virtual bool GetMTPStorageInfoFromDeviceId( | |
| 40 const std::string& storage_device_id, | |
| 41 string16* device_location, | |
| 42 string16* storage_object_id) const = 0; | |
| 43 #endif | |
| 33 }; | 44 }; |
| 34 | 45 |
| 35 } // namespace chrome | 46 } // namespace chrome |
| 36 | 47 |
| 37 #endif // CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_STORAGE_NOTIFICATIONS_H_ | 48 #endif // CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_STORAGE_NOTIFICATIONS_H_ |
| OLD | NEW |