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

Unified Diff: chrome/browser/chromeos/cros/mount_library.h

Issue 7826037: Adding support to retrieve remaining and total space on disk/file shelf. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 months 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/chromeos/cros/mount_library.h
diff --git a/chrome/browser/chromeos/cros/mount_library.h b/chrome/browser/chromeos/cros/mount_library.h
index 8108f442faa607b109fef504ebde6d8eae73d66d..c4c7bec90d60febcdeccc5739c0107f866e8a2de 100644
--- a/chrome/browser/chromeos/cros/mount_library.h
+++ b/chrome/browser/chromeos/cros/mount_library.h
@@ -55,6 +55,9 @@ class MountLibcrosProxy {
virtual void CallGetDiskProperties(const char* device_path,
GetDiskPropertiesCallback callback,
void* object) = 0;
+ virtual void CallGetSizeStats(const char* mount_path,
+ GetSizeStatsCallback callback,
+ void* object) = 0;
virtual MountEventConnection MonitorCrosDisks(MountEventMonitor monitor,
MountCompletedMonitor mount_complete_monitor,
void* object) = 0;
@@ -170,6 +173,15 @@ class MountLibrary {
const MountPointInfo& mount_info) = 0;
};
+ class CallbackDelegate {
+ public:
+ virtual ~CallbackDelegate() {}
+ virtual void GetSizeStatsCallback(const char* mount_path,
+ bool success,
+ size_t total_size_kb,
+ size_t remaining_size_kb) = 0;
+ };
+
virtual ~MountLibrary() {}
virtual void AddObserver(Observer* observer) = 0;
virtual void RemoveObserver(Observer* observer) = 0;
@@ -183,6 +195,10 @@ class MountLibrary {
// |path| is device's mount path.
virtual void UnmountPath(const char* path) = 0;
+ // Retrieves total and remaining available size on |mount_path|.
+ virtual void GetSizeStats(const char* mount_path,
+ CallbackDelegate* callback_delegate) = 0;
+
// Formats device given its file path.
// Example: file_path: /dev/sdb1
virtual void FormatUnmountedDevice(const char* file_path) = 0;

Powered by Google App Engine
This is Rietveld 408576698