Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Unified Diff: chrome/browser/system_monitor/removable_device_notifications_linux.h

Issue 11363153: [Media Gallery][Linux] Improve device media gallery names. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix linux_clang compile error Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..f8bff59e5cef8173ff01af3168c5f033d725d2de 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) const;
+
protected:
// Only for use in unit tests.
RemovableDeviceNotificationsLinux(const FilePath& path,
@@ -75,12 +81,15 @@ 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 {
+ MountPointInfo();
+
FilePath mount_device;
std::string device_id;
string16 device_name;
+ uint64 partition_size_in_bytes;
};
// Mapping of mount points to MountPointInfo.

Powered by Google App Engine
This is Rietveld 408576698