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

Side by Side Diff: chrome/common/extensions/api/storage.json

Issue 9921003: Make the constants in the chrome.storage API actual powers of 2, and comma- (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/common/extensions/docs/js/api_page_generator.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 [ 5 [
6 { 6 {
7 "namespace": "storage", 7 "namespace": "storage",
8 "unprivileged": true, 8 "unprivileged": true,
9 "types": [ 9 "types": [
10 { 10 {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 "description": "Storage items to return in the callback, whe re the values are replaced with those from storage if they exist.", 42 "description": "Storage items to return in the callback, whe re the values are replaced with those from storage if they exist.",
43 "additionalProperties": { "type": "any" } 43 "additionalProperties": { "type": "any" }
44 } 44 }
45 ], 45 ],
46 "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.", 46 "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.",
47 "optional": true 47 "optional": true
48 }, 48 },
49 { 49 {
50 "name": "callback", 50 "name": "callback",
51 "type": "function", 51 "type": "function",
52 "description": "Callback with storage items, or on failure (in w hich case lastError will be set).", 52 "description": "Callback with storage items, or on failure (in w hich case <a href='extension.html#property-lastError'>chrome.extension.lastError </a> will be set).",
53 "parameters": [ 53 "parameters": [
54 { 54 {
55 "name": "items", 55 "name": "items",
56 "type": "object", 56 "type": "object",
57 "additionalProperties": { "type": "any" }, 57 "additionalProperties": { "type": "any" },
58 "description": "Object with items in their key-value mapping s." 58 "description": "Object with items in their key-value mapping s."
59 } 59 }
60 ] 60 ]
61 } 61 }
62 ] 62 ]
63 }, 63 },
64 { 64 {
65 "name": "getBytesInUse", 65 "name": "getBytesInUse",
66 "type": "function", 66 "type": "function",
67 "description": "Gets the amount of space (in bytes) being used by on e or more items.", 67 "description": "Gets the amount of space (in bytes) being used by on e or more items.",
68 "parameters": [ 68 "parameters": [
69 { 69 {
70 "name": "keys", 70 "name": "keys",
71 "choices": [ 71 "choices": [
72 { "type": "string" }, 72 { "type": "string" },
73 { "type": "array", "items": { "type": "string" } } 73 { "type": "array", "items": { "type": "string" } }
74 ], 74 ],
75 "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 "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.",
76 "optional": true 76 "optional": true
77 }, 77 },
78 { 78 {
79 "name": "callback", 79 "name": "callback",
80 "type": "function", 80 "type": "function",
81 "description": "Callback with the amount of space being used by storage, or on failure (in which case lastError will be set).", 81 "description": "Callback with the amount of space being used by storage, or on failure (in which case <a href='extension.html#property-lastError '>chrome.extension.lastError</a> will be set).",
82 "parameters": [ 82 "parameters": [
83 { 83 {
84 "name": "bytesInUse", 84 "name": "bytesInUse",
85 "type": "integer", 85 "type": "integer",
86 "description": "Amount of space being used in storage, in by tes." 86 "description": "Amount of space being used in storage, in by tes."
87 } 87 }
88 ] 88 ]
89 } 89 }
90 ] 90 ]
91 }, 91 },
92 { 92 {
93 "name": "set", 93 "name": "set",
94 "type": "function", 94 "type": "function",
95 "description": "Sets multiple items.", 95 "description": "Sets multiple items.",
96 "parameters": [ 96 "parameters": [
97 { 97 {
98 "name": "items", 98 "name": "items",
99 "type": "object", 99 "type": "object",
100 "additionalProperties": { "type": "any" }, 100 "additionalProperties": { "type": "any" },
101 "description": "Object specifying items to augment storage with. Values that cannot be serialized (functions, etc) will be ignored." 101 "description": "Object specifying items to augment storage with. Values that cannot be serialized (functions, etc) will be ignored."
102 }, 102 },
103 { 103 {
104 "name": "callback", 104 "name": "callback",
105 "type": "function", 105 "type": "function",
106 "description": "Callback on success, or on failure (in which cas e lastError will be set).", 106 "description": "Callback on success, or on failure (in which cas e <a href='extension.html#property-lastError'>chrome.extension.lastError</a> wil l be set).",
107 "parameters": [], 107 "parameters": [],
108 "optional": true 108 "optional": true
109 } 109 }
110 ] 110 ]
111 }, 111 },
112 { 112 {
113 "name": "remove", 113 "name": "remove",
114 "type": "function", 114 "type": "function",
115 "description": "Removes one or more items from storage.", 115 "description": "Removes one or more items from storage.",
116 "parameters": [ 116 "parameters": [
117 { 117 {
118 "name": "keys", 118 "name": "keys",
119 "choices": [ 119 "choices": [
120 {"type": "string"}, 120 {"type": "string"},
121 {"type": "array", "items": {"type": "string"}, "minItems": 1} 121 {"type": "array", "items": {"type": "string"}, "minItems": 1}
122 ], 122 ],
123 "description": "A single key or a list of keys for items to remo ve." 123 "description": "A single key or a list of keys for items to remo ve."
124 }, 124 },
125 { 125 {
126 "name": "callback", 126 "name": "callback",
127 "type": "function", 127 "type": "function",
128 "description": "Callback on success, or on failure (in which cas e lastError will be set).", 128 "description": "Callback on success, or on failure (in which cas e <a href='extension.html#property-lastError'>chrome.extension.lastError</a> wil l be set).",
129 "parameters": [], 129 "parameters": [],
130 "optional": true 130 "optional": true
131 } 131 }
132 ] 132 ]
133 }, 133 },
134 { 134 {
135 "name": "clear", 135 "name": "clear",
136 "type": "function", 136 "type": "function",
137 "description": "Removes all items from storage.", 137 "description": "Removes all items from storage.",
138 "parameters": [ 138 "parameters": [
139 { 139 {
140 "name": "callback", 140 "name": "callback",
141 "type": "function", 141 "type": "function",
142 "description": "Callback on success, or on failure (in which cas e lastError will be set).", 142 "description": "Callback on success, or on failure (in which cas e <a href='extension.html#property-lastError'>chrome.extension.lastError</a> wil l be set).",
143 "parameters": [], 143 "parameters": [],
144 "optional": true 144 "optional": true
145 } 145 }
146 ] 146 ]
147 } 147 }
148 ] 148 ]
149 } 149 }
150 ], 150 ],
151 "events": [ 151 "events": [
152 { 152 {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 } 191 }
192 } 192 }
193 }, 193 },
194 "local": { 194 "local": {
195 "$ref": "StorageArea", 195 "$ref": "StorageArea",
196 "description": "Items under the \"local\" namespace are local to each ma chine.", 196 "description": "Items under the \"local\" namespace are local to each ma chine.",
197 "value": [ "local" ], 197 "value": [ "local" ],
198 "properties": { 198 "properties": {
199 "QUOTA_BYTES": { 199 "QUOTA_BYTES": {
200 "type": "integer", 200 "type": "integer",
201 "value": "5120000", 201 "value": "5242880",
202 "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." 202 "description": "The maximum amount (in bytes) of data that can be st ored in local storage. This value will be ignored if the extension has the <code >unlimitedStorage</code> permission."
203 } 203 }
204 } 204 }
205 } 205 }
206 } 206 }
207 } 207 }
208 ] 208 ]
OLDNEW
« no previous file with comments | « no previous file | chrome/common/extensions/docs/js/api_page_generator.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698