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

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: Upload again Created 7 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/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..04fdd6be51033ecc59a8ea7e5a5795f97230fe6d 100644
--- a/chrome/common/extensions/api/system_storage.idl
+++ b/chrome/common/extensions/api/system_storage.idl
@@ -30,6 +30,12 @@ namespace system.storage {
double capacity;
};
+ dictionary StorageAvailableCapacityInfo {
+ DOMString id;
Greg Billock 2013/10/14 20:32:05 Can we arrange to pass this in JS and just return
Haojian Wu 2013/10/15 00:50:26 Yes. We can just return the capacity instead of th
Greg Billock 2013/10/15 15:26:04 Sounds good. On 2013/10/15 00:50:26, Haojian Wu w
Greg Billock 2013/10/15 15:26:04 Add a comment about this id that it is the same ID
Haojian Wu 2013/10/16 04:04:23 Done.
+ // 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 +54,9 @@ namespace system.storage {
callback StorageInfoCallback = void (StorageUnitInfo[] info);
+ callback getAvailableCapacityCallback = void (
+ 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 +64,10 @@ 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.
Greg Billock 2013/10/15 15:26:04 Clarify here about id: "... of a specified storage
Haojian Wu 2013/10/16 04:04:23 Done.
+ static void getAvailableCapacity(DOMString id,
+ getAvailableCapacityCallback callback);
};
interface Events {
@@ -66,4 +79,3 @@ namespace system.storage {
};
};
-

Powered by Google App Engine
This is Rietveld 408576698