OLD | NEW |
1 [ | 1 [ |
2 { | 2 { |
3 "namespace": "storage", | 3 "namespace": "storage", |
4 "types": [ | 4 "types": [ |
5 { | 5 { |
6 "id": "StorageChange", | 6 "id": "StorageChange", |
7 "type": "object", | 7 "type": "object", |
8 "properties": { | 8 "properties": { |
9 "oldValue": { | 9 "oldValue": { |
10 "type": "any", | 10 "type": "any", |
11 "description": "The old value of the item, if there was an old value
.", | 11 "description": "The old value of the item, if there was an old value
.", |
12 "optional": true | 12 "optional": true |
13 }, | 13 }, |
14 "newValue": { | 14 "newValue": { |
15 "type": "any", | 15 "type": "any", |
16 "description": "The new value of the item, if there is a new value."
, | 16 "description": "The new value of the item, if there is a new value."
, |
17 "optional": true | 17 "optional": true |
18 } | 18 } |
19 } | 19 } |
20 }, | 20 }, |
21 { | 21 { |
22 "id": "StorageNamespace", | 22 "id": "StorageArea", |
23 "type": "object", | 23 "type": "object", |
24 "functions": [ | 24 "functions": [ |
25 { | 25 { |
26 "name": "get", | 26 "name": "get", |
27 "unprivileged": true, | 27 "unprivileged": true, |
28 "type": "function", | 28 "type": "function", |
29 "description": "Gets one or more items from storage.", | 29 "description": "Gets one or more items from storage.", |
30 "parameters": [ | 30 "parameters": [ |
31 { | 31 { |
32 "name": "keys", | 32 "name": "keys", |
33 "choices": [ | 33 "choices": [ |
34 { "type": "string" }, | 34 { "type": "string" }, |
35 { "type": "array", "items": { "type": "string" } }, | 35 { "type": "array", "items": { "type": "string" } }, |
36 { | 36 { |
37 "type": "object", | 37 "type": "object", |
38 "description": "Storage items to return in the callback, whe
re the values are replaced with those from storage if they exist.", | 38 "description": "Storage items to return in the callback, whe
re the values are replaced with those from storage if they exist.", |
39 "properties": {}, | 39 "properties": {}, |
40 "additionalProperties": { "type": "any" } | 40 "additionalProperties": { "type": "any" } |
41 } | 41 } |
42 ], | 42 ], |
43 "description": "A single key to get, list of keys to get, or a d
ictionary specifying default values (see description of the object). An empty l
ist or object will return an empty result object. Pass in null or undefined to
get the entire contents of storage; this should only be used for debugging.", | 43 "description": "A single key to get, list of keys to get, or a d
ictionary specifying default values (see description of the object). An empty l
ist or object will return an empty result object. Pass in <code>null</code> to
get the entire contents of storage.", |
44 "optional": true | 44 "optional": true |
45 }, | 45 }, |
46 { | 46 { |
47 "name": "callback", | 47 "name": "callback", |
48 "type": "function", | 48 "type": "function", |
49 "description": "Callback with storage items, or on failure (in w
hich case lastError will be set).", | 49 "description": "Callback with storage items, or on failure (in w
hich case lastError will be set).", |
50 "parameters": [ | 50 "parameters": [ |
51 { | 51 { |
52 "name": "items", | 52 "name": "items", |
53 "type": "object", | 53 "type": "object", |
54 "properties": {}, | 54 "properties": {}, |
55 "additionalProperties": { "type": "any" }, | 55 "additionalProperties": { "type": "any" }, |
56 "description": "Object with items in their key-value mapping
s." | 56 "description": "Object with items in their key-value mapping
s." |
57 } | 57 } |
58 ] | 58 ] |
59 } | 59 } |
60 ] | 60 ] |
61 }, | 61 }, |
62 { | 62 { |
| 63 "name": "getBytesInUse", |
| 64 "unprivileged": true, |
| 65 "type": "function", |
| 66 "description": "Gets the amount of space (in bytes) being used by on
e or more items.", |
| 67 "parameters": [ |
| 68 { |
| 69 "name": "keys", |
| 70 "choices": [ |
| 71 { "type": "string" }, |
| 72 { "type": "array", "items": { "type": "string" } } |
| 73 ], |
| 74 "description": "A single key or list of keys to get the total us
age for. An empty list will return 0. Pass in <code>null</code> to get the total
usage of all of storage.", |
| 75 "optional": true |
| 76 }, |
| 77 { |
| 78 "name": "callback", |
| 79 "type": "function", |
| 80 "description": "Callback with the amount of space being used by
storage, or on failure (in which case lastError will be set).", |
| 81 "parameters": [ |
| 82 { |
| 83 "name": "bytesInUse", |
| 84 "type": "integer", |
| 85 "description": "Amount of space being used in storage, in by
tes." |
| 86 } |
| 87 ] |
| 88 } |
| 89 ] |
| 90 }, |
| 91 { |
63 "name": "set", | 92 "name": "set", |
64 "unprivileged": true, | 93 "unprivileged": true, |
65 "type": "function", | 94 "type": "function", |
66 "description": "Sets multiple items.", | 95 "description": "Sets multiple items.", |
67 "parameters": [ | 96 "parameters": [ |
68 { | 97 { |
69 "name": "items", | 98 "name": "items", |
70 "type": "object", | 99 "type": "object", |
71 "properties": {}, | 100 "properties": {}, |
72 "additionalProperties": { "type": "any" }, | 101 "additionalProperties": { "type": "any" }, |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 { | 168 { |
140 "name": "namespace", | 169 "name": "namespace", |
141 "type": "string", | 170 "type": "string", |
142 "description": "The namespace (\"sync\" or \"local\") of the storage
area the changes are for." | 171 "description": "The namespace (\"sync\" or \"local\") of the storage
area the changes are for." |
143 } | 172 } |
144 ] | 173 ] |
145 } | 174 } |
146 ], | 175 ], |
147 "properties": { | 176 "properties": { |
148 "sync": { | 177 "sync": { |
149 "$ref": "StorageNamespace", | 178 "$ref": "StorageArea", |
150 "description": "Items under the \"sync\" namespace are synced using Chro
me Sync.", | 179 "description": "Items under the \"sync\" namespace are synced using Chro
me Sync.", |
151 "unprivileged": true, | 180 "unprivileged": true, |
152 "value": [ "sync" ] | 181 "value": [ "sync" ], |
| 182 "properties": { |
| 183 "QUOTA_BYTES": { |
| 184 "type": "integer", |
| 185 "value": "102400", |
| 186 "unprivileged": true, |
| 187 "description": "The maximum total amount (in bytes) of data that can
be stored in sync storage." |
| 188 }, |
| 189 "QUOTA_BYTES_PER_ITEM": { |
| 190 "type": "integer", |
| 191 "value": "2048", |
| 192 "unprivileged": true, |
| 193 "description": "The maximum size (in bytes) of each individual item
in sync storage." |
| 194 }, |
| 195 "MAX_ITEMS": { |
| 196 "type": "integer", |
| 197 "value": "512", |
| 198 "unprivileged": true, |
| 199 "description": "The maximum number of items that can be stored in sy
nc storage." |
| 200 } |
| 201 } |
153 }, | 202 }, |
154 "local": { | 203 "local": { |
155 "$ref": "StorageNamespace", | 204 "$ref": "StorageArea", |
156 "description": "Items under the \"local\" namespace are local to each ma
chine.", | 205 "description": "Items under the \"local\" namespace are local to each ma
chine.", |
157 "unprivileged": true, | 206 "unprivileged": true, |
158 "value": [ "local" ] | 207 "value": [ "local" ], |
| 208 "properties": { |
| 209 "QUOTA_BYTES": { |
| 210 "type": "integer", |
| 211 "value": "5120000", |
| 212 "unprivileged": true, |
| 213 "description": "The maximum amount (in bytes) of data that can be st
ored in local storage. This value may be ignored if the extension has the <code>
unlimitedStorage</code> permission." |
| 214 } |
| 215 } |
159 } | 216 } |
160 } | 217 } |
161 } | 218 } |
162 ] | 219 ] |
OLD | NEW |