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

Unified Diff: chrome/common/extensions/api/system_storage.idl

Issue 22548009: [SystemInfo API] Implement storage.getAvailableCapacity API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@impl_get_available_capacity_api2
Patch Set: Rebase Created 7 years, 2 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/common/extensions/api/system_storage.idl
diff --git a/chrome/common/extensions/api/system_storage.idl b/chrome/common/extensions/api/system_storage.idl
index 33338d4a1ed40c70fccbe0a154fa54b671974b14..fc64ef08e04cac55616d56be4dcfa1093d4a3cc0 100644
--- a/chrome/common/extensions/api/system_storage.idl
+++ b/chrome/common/extensions/api/system_storage.idl
@@ -30,6 +30,13 @@ namespace system.storage {
double capacity;
};
+ dictionary StorageAvailableCapacityInfo {
+ // The same |id| from the getAvailableCapacity function parameter |id|.
not at google - send to devlin 2013/10/18 00:33:11 I can't parse this sentence
Haojian Wu 2013/10/18 00:47:38 Done.
+ DOMString id;
+ // The available capacity of the storage device, in bytes.
+ double availableCapacity;
+ };
+
[inline_doc] enum EjectDeviceResultCode {
// The ejection command is successful -- the application can prompt the user
// to remove the device.
@@ -48,6 +55,9 @@ namespace system.storage {
callback StorageInfoCallback = void (StorageUnitInfo[] info);
+ callback getAvailableCapacityCallback = void (
not at google - send to devlin 2013/10/18 00:33:11 get -> Get
Haojian Wu 2013/10/18 00:47:38 The extension api name should follow this way(the
+ StorageAvailableCapacityInfo info);
+
interface Functions {
// Get the storage information from the system. The argument passed to the
// callback is an array of StorageUnitInfo objects.
@@ -55,6 +65,11 @@ namespace system.storage {
// Ejects a removable storage device.
static void ejectDevice(DOMString id, EjectDeviceCallback callback);
+
+ // Get the available capacity of a specified |id| storage device.
+ // The |id| is the transient device ID from StorageUnitInfo.
+ static void getAvailableCapacity(DOMString id,
+ getAvailableCapacityCallback callback);
};
interface Events {
@@ -66,4 +81,3 @@ namespace system.storage {
};
};
-

Powered by Google App Engine
This is Rietveld 408576698