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

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

Issue 9274004: Take the Extension Storage API out of experimental. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 11 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 | « chrome/common/common_resources.grd ('k') | chrome/common/extensions/api/extension_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 [
2 {
3 "namespace": "experimental.storage",
4 "types": [
5 {
6 "id": "StorageChange",
7 "type": "object",
8 "properties": {
9 "oldValue": {
10 "type": "any",
11 "description": "The old value of the item, if there was an old value .",
12 "optional": true
13 },
14 "newValue": {
15 "type": "any",
16 "description": "The new value of the item, if there is a new value." ,
17 "optional": true
18 }
19 }
20 },
21 {
22 "id": "StorageNamespace",
23 "type": "object",
24 "functions": [
25 {
26 "name": "get",
27 "unprivileged": true,
28 "type": "function",
29 "description": "Gets one or more items from storage.",
30 "parameters": [
31 {
32 "name": "keys",
33 "choices": [
34 { "type": "string" },
35 { "type": "array", "items": { "type": "string" } },
36 {
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.",
39 "properties": {},
40 "additionalProperties": { "type": "any" }
41 }
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.",
44 "optional": true
45 },
46 {
47 "name": "callback",
48 "type": "function",
49 "description": "Callback with storage items, or on failure (in w hich case lastError will be set).",
50 "parameters": [
51 {
52 "name": "items",
53 "type": "object",
54 "properties": {},
55 "additionalProperties": { "type": "any" },
56 "description": "Object with items in their key-value mapping s."
57 }
58 ]
59 }
60 ]
61 },
62 {
63 "name": "set",
64 "unprivileged": true,
65 "type": "function",
66 "description": "Sets multiple items.",
67 "parameters": [
68 {
69 "name": "items",
70 "type": "object",
71 "properties": {},
72 "additionalProperties": { "type": "any" },
73 "description": "Object specifying items to augment storage with. Values that cannot be serialized (functions, etc) will be ignored."
74 },
75 {
76 "name": "callback",
77 "type": "function",
78 "description": "Callback on success, or on failure (in which cas e lastError will be set).",
79 "parameters": [],
80 "optional": true
81 }
82 ]
83 },
84 {
85 "name": "remove",
86 "unprivileged": true,
87 "type": "function",
88 "description": "Removes one or more items from storage.",
89 "parameters": [
90 {
91 "name": "keys",
92 "choices": [
93 {"type": "string"},
94 {"type": "array", "items": {"type": "string"}, "minItems": 1}
95 ],
96 "description": "A single key or a list of keys for items to remo ve."
97 },
98 {
99 "name": "callback",
100 "type": "function",
101 "description": "Callback on success, or on failure (in which cas e lastError will be set).",
102 "parameters": [],
103 "optional": true
104 }
105 ]
106 },
107 {
108 "name": "clear",
109 "unprivileged": true,
110 "type": "function",
111 "description": "Removes all items from storage.",
112 "parameters": [
113 {
114 "name": "callback",
115 "type": "function",
116 "description": "Callback on success, or on failure (in which cas e lastError will be set).",
117 "parameters": [],
118 "optional": true
119 }
120 ]
121 }
122 ]
123 }
124 ],
125 "events": [
126 {
127 "name": "onChanged",
128 "unprivileged": true,
129 "type": "function",
130 "description": "Fired when one or more items change.",
131 "parameters": [
132 {
133 "name": "changes",
134 "type": "object",
135 "properties": {},
136 "additionalProperties": { "$ref": "StorageChange" },
137 "description": "Object mapping each key that changed to its correspo nding <a href='#type-StorageChange'>StorageChange</a> for that item."
138 },
139 {
140 "name": "namespace",
141 "type": "string",
142 "description": "The namespace (\"sync\" or \"local\") of the storage area the changes are for."
143 }
144 ]
145 }
146 ],
147 "properties": {
148 "sync": {
149 "$ref": "StorageNamespace",
150 "description": "Items under the \"sync\" namespace are synced using Chro me Sync.",
151 "unprivileged": true,
152 "value": [ "sync" ]
153 },
154 "local": {
155 "$ref": "StorageNamespace",
156 "description": "Items under the \"local\" namespace are local to each ma chine.",
157 "unprivileged": true,
158 "value": [ "local" ]
159 }
160 }
161 }
162 ]
OLDNEW
« no previous file with comments | « chrome/common/common_resources.grd ('k') | chrome/common/extensions/api/extension_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698