Index: chrome/common/extensions/api/storage.json |
diff --git a/chrome/common/extensions/api/storage.json b/chrome/common/extensions/api/storage.json |
index a52e2171aec1ceba0c6de7d35adca4b0c0954dee..fbf45f0fd27b6629dcaf121a6d5f6c800e47fe4e 100644 |
--- a/chrome/common/extensions/api/storage.json |
+++ b/chrome/common/extensions/api/storage.json |
@@ -19,7 +19,7 @@ |
} |
}, |
{ |
- "id": "StorageNamespace", |
+ "id": "StorageArea", |
"type": "object", |
"functions": [ |
{ |
@@ -118,6 +118,26 @@ |
"optional": true |
} |
] |
+ }, |
+ { |
+ "name": "getBytesInUse", |
+ "unprivileged": true, |
+ "type": "function", |
+ "description": "Get the amount of space being used in storage, in bytes.", |
+ "parameters": [ |
+ { |
+ "name": "callback", |
+ "type": "function", |
+ "description": "Callback with the amount of space being used by storage, or on failure (in which case lastError will be set).", |
+ "parameters": [ |
+ { |
+ "name": "bytesInUse", |
+ "type": "integer", |
+ "description": "Amount of space being used in storage, in bytes." |
+ } |
+ ] |
+ } |
+ ] |
} |
] |
} |
@@ -146,16 +166,44 @@ |
], |
"properties": { |
"sync": { |
- "$ref": "StorageNamespace", |
+ "$ref": "StorageArea", |
"description": "Items under the \"sync\" namespace are synced using Chrome Sync.", |
"unprivileged": true, |
- "value": [ "sync" ] |
+ "value": [ "sync" ], |
+ "properties": { |
+ "QUOTA_BYTES": { |
Matt Perry
2012/01/24 21:54:59
What's our style for API constants? I don't think
not at google - send to devlin
2012/01/24 21:56:48
Ah, I was basing it off that WINDOW_ID_NONE variab
Matt Perry
2012/01/24 22:02:19
Oh OK, sounds like there's precedent. Carry on, th
|
+ "type": "integer", |
+ "value": "102400", |
+ "unprivileged": true, |
+ "description": "The maximum total amount (in bytes) of data that can be stored in sync storage." |
+ }, |
+ "QUOTA_BYTES_PER_ITEM": { |
+ "type": "integer", |
+ "value": "2048", |
+ "unprivileged": true, |
+ "description": "The maximum size (in bytes) of each individual item in sync storage." |
+ }, |
+ "MAX_ITEMS": { |
+ "type": "integer", |
+ "value": "512", |
+ "unprivileged": true, |
+ "description": "The maximum number of items that can be stored in sync storage." |
+ } |
+ } |
}, |
"local": { |
- "$ref": "StorageNamespace", |
+ "$ref": "StorageArea", |
"description": "Items under the \"local\" namespace are local to each machine.", |
"unprivileged": true, |
- "value": [ "local" ] |
+ "value": [ "local" ], |
+ "properties": { |
+ "QUOTA_BYTES": { |
+ "type": "integer", |
+ "value": "5120000", |
+ "unprivileged": true, |
+ "description": "The maximum amount (in bytes) of data that can be stored in local storage. This value may be ignored if the extension has the <tt>unlimitedStorage</tt> permission." |
+ } |
+ } |
} |
} |
} |