Chromium Code Reviews| Index: chrome/browser/system_monitor/removable_device_notifications_linux.h |
| diff --git a/chrome/browser/system_monitor/removable_device_notifications_linux.h b/chrome/browser/system_monitor/removable_device_notifications_linux.h |
| index ee2ff83e81eaa96b5c77dd636073fa66b8c06c6c..aafe90d2c943e0e2c4e280807132c903a7a0c673 100644 |
| --- a/chrome/browser/system_monitor/removable_device_notifications_linux.h |
| +++ b/chrome/browser/system_monitor/removable_device_notifications_linux.h |
| @@ -28,10 +28,12 @@ |
| class FilePath; |
| // Gets device information given a |device_path|. On success, fills in |
| -// |unique_id|, |name|, and |removable|. |
| +// |unique_id|, |name|, |removable| and |partition_size_in_bytes|. |
| typedef void (*GetDeviceInfoFunc)(const FilePath& device_path, |
| - std::string* unique_id, string16* name, |
| - bool* removable); |
| + std::string* unique_id, |
| + string16* name, |
| + bool* removable, |
| + uint64* partition_size_in_bytes); |
| namespace chrome { |
| @@ -56,6 +58,10 @@ class RemovableDeviceNotificationsLinux |
| const FilePath& path, |
| base::SystemMonitor::RemovableStorageInfo* device_info) const; |
| + // Returns the storage partition size of the device present at |location|. |
| + // If the requested information is unavailable, returns 0. |
| + uint64 GetStorageSize(const std::string& location); |
|
Lei Zhang
2012/11/13 20:35:04
nit: const
kmadhusu
2012/11/13 21:57:27
Done.
Lei Zhang
2012/11/13 22:17:49
No, I mean mark the method as const.
kmadhusu
2012/11/13 23:05:32
Done.
|
| + |
| protected: |
| // Only for use in unit tests. |
| RemovableDeviceNotificationsLinux(const FilePath& path, |
| @@ -75,12 +81,13 @@ class RemovableDeviceNotificationsLinux |
| friend struct content::BrowserThread::DeleteOnThread< |
| content::BrowserThread::FILE>; |
| - // Structure to save mounted device information such as device path and unique |
| - // identifier. |
| + // Structure to save mounted device information such as device path, unique |
| + // identifier, device name and partition size. |
| struct MountPointInfo { |
| FilePath mount_device; |
| std::string device_id; |
| string16 device_name; |
| + uint64 partition_size_in_bytes; |
| }; |
| // Mapping of mount points to MountPointInfo. |