Upstream version 11.40.277.0
[platform/framework/web/crosswalk.git] / src / chrome / common / extensions / api / browsing_data.json
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
3 // found in the LICENSE file.
4
5 [
6   {
7     "namespace": "browsingData",
8     "description": "Use the <code>chrome.browsingData</code> API to remove browsing data from a user's local profile.",
9     "types": [
10       {
11         "id": "RemovalOptions",
12         "type": "object",
13         "description": "Options that determine exactly what data will be removed.",
14         "properties": {
15           "since": {
16             "type": "number",
17             "optional": true,
18             "description": "Remove data accumulated on or after this date, represented in milliseconds since the epoch (accessible via the <code>getTime</code> method of the JavaScript <code>Date</code> object). If absent, defaults to 0 (which would remove all browsing data)."
19           },
20           "originTypes": {
21             "type": "object",
22             "optional": true,
23             "description": "An object whose properties specify which origin types ought to be cleared. If this object isn't specified, it defaults to clearing only \"unprotected\" origins. Please ensure that you <em>really</em> want to remove application data before adding 'protectedWeb' or 'extensions'.",
24             "properties": {
25               "unprotectedWeb": {
26                 "type": "boolean",
27                 "optional": true,
28                 "description": "Normal websites."
29               },
30               "protectedWeb": {
31                 "type": "boolean",
32                 "optional": true,
33                 "description": "Websites that have been installed as hosted applications (be careful!)."
34               },
35               "extension": {
36                 "type": "boolean",
37                 "optional": true,
38                 "description": "Extensions and packaged applications a user has installed (be _really_ careful!)."
39               }
40             }
41           }
42         }
43       },
44       {
45         "id": "DataTypeSet",
46         "type": "object",
47         "description": "A set of data types. Missing data types are interpreted as <code>false</code>.",
48         "properties": {
49           "appcache": {
50             "type": "boolean",
51             "optional": true,
52             "description": "Websites' appcaches."
53           },
54           "cache": {
55             "type": "boolean",
56             "optional": true,
57             "description": "The browser's cache. Note: when removing data, this clears the <em>entire</em> cache: it is not limited to the range you specify."
58           },
59           "cookies": {
60             "type": "boolean",
61             "optional": true,
62             "description": "The browser's cookies."
63           },
64           "downloads": {
65             "type": "boolean",
66             "optional": true,
67             "description": "The browser's download list."
68           },
69           "fileSystems": {
70             "type": "boolean",
71             "optional": true,
72             "description": "Websites' file systems."
73           },
74           "formData": {
75             "type": "boolean",
76             "optional": true,
77             "description": "The browser's stored form data."
78           },
79           "history": {
80             "type": "boolean",
81             "optional": true,
82             "description": "The browser's history."
83           },
84           "indexedDB": {
85             "type": "boolean",
86             "optional": true,
87             "description": "Websites' IndexedDB data."
88           },
89           "localStorage": {
90             "type": "boolean",
91             "optional": true,
92             "description": "Websites' local storage data."
93           },
94           "serverBoundCertificates": {
95             "type": "boolean",
96             "optional": true,
97             "description": "Server-bound certificates."
98           },
99           "passwords": {
100             "type": "boolean",
101             "optional": true,
102             "description": "Stored passwords."
103           },
104           "pluginData": {
105             "type": "boolean",
106             "optional": true,
107             "description": "Plugins' data."
108           },
109           "serviceWorkers": {
110             "type": "boolean",
111             "optional": true,
112             "description": "Service Workers."
113           },
114           "webSQL": {
115             "type": "boolean",
116             "optional": true,
117             "description": "Websites' WebSQL data."
118           }
119         }
120       }
121     ],
122     "functions": [
123       {
124         "name": "settings",
125         "description": "Reports which types of data are currently selected in the 'Clear browsing data' settings UI.  Note: some of the data types included in this API are not available in the settings UI, and some UI settings control more than one data type listed here.",
126         "type": "function",
127         "parameters": [
128           {
129             "name": "callback",
130             "type": "function",
131             "parameters": [
132               {
133                 "name": "result",
134                 "type": "object",
135                 "properties": {
136                   "options": {
137                     "$ref": "RemovalOptions"
138                   },
139                   "dataToRemove": {
140                     "$ref": "DataTypeSet",
141                     "description": "All of the types will be present in the result, with values of <code>true</code> if they are both selected to be removed and permitted to be removed, otherwise <code>false</code>."
142                   },
143                   "dataRemovalPermitted": {
144                     "$ref": "DataTypeSet",
145                     "description": "All of the types will be present in the result, with values of <code>true</code> if they are permitted to be removed (e.g., by enterprise policy) and <code>false</code> if not."
146                   }
147                 }
148               }
149             ]
150           }
151         ]
152       },
153       {
154         "name": "remove",
155         "description": "Clears various types of browsing data stored in a user's profile.",
156         "type": "function",
157         "parameters": [
158           {
159             "$ref": "RemovalOptions",
160             "name": "options"
161           },
162           {
163             "name": "dataToRemove",
164             "$ref": "DataTypeSet",
165             "description": "The set of data types to remove."
166           },
167           {
168             "name": "callback",
169             "type": "function",
170             "description": "Called when deletion has completed.",
171             "optional": true,
172             "parameters": []
173           }
174         ]
175       },
176       {
177         "name": "removeAppcache",
178         "description": "Clears websites' appcache data.",
179         "type": "function",
180         "parameters": [
181           {
182             "$ref": "RemovalOptions",
183             "name": "options"
184           },
185           {
186             "name": "callback",
187             "type": "function",
188             "description": "Called when websites' appcache data has been cleared.",
189             "optional": true,
190             "parameters": []
191           }
192         ]
193       },
194       {
195         "name": "removeCache",
196         "description": "Clears the browser's cache.",
197         "type": "function",
198         "parameters": [
199           {
200             "$ref": "RemovalOptions",
201             "name": "options"
202           },
203           {
204             "name": "callback",
205             "type": "function",
206             "description": "Called when the browser's cache has been cleared.",
207             "optional": true,
208             "parameters": []
209           }
210         ]
211       },
212       {
213         "name": "removeCookies",
214         "description": "Clears the browser's cookies and server-bound certificates modified within a particular timeframe.",
215         "type": "function",
216         "parameters": [
217           {
218             "$ref": "RemovalOptions",
219             "name": "options"
220           },
221           {
222             "name": "callback",
223             "type": "function",
224             "description": "Called when the browser's cookies and server-bound certificates have been cleared.",
225             "optional": true,
226             "parameters": []
227           }
228         ]
229       },
230       {
231         "name": "removeDownloads",
232         "description": "Clears the browser's list of downloaded files (<em>not</em> the downloaded files themselves).",
233         "type": "function",
234         "parameters": [
235           {
236             "$ref": "RemovalOptions",
237             "name": "options"
238           },
239           {
240             "name": "callback",
241             "type": "function",
242             "description": "Called when the browser's list of downloaded files has been cleared.",
243             "optional": true,
244             "parameters": []
245           }
246         ]
247       },
248       {
249         "name": "removeFileSystems",
250         "description": "Clears websites' file system data.",
251         "type": "function",
252         "parameters": [
253           {
254             "$ref": "RemovalOptions",
255             "name": "options"
256           },
257           {
258             "name": "callback",
259             "type": "function",
260             "description": "Called when websites' file systems have been cleared.",
261             "optional": true,
262             "parameters": []
263           }
264         ]
265       },
266       {
267         "name": "removeFormData",
268         "description": "Clears the browser's stored form data (autofill).",
269         "type": "function",
270         "parameters": [
271           {
272             "$ref": "RemovalOptions",
273             "name": "options"
274           },
275           {
276             "name": "callback",
277             "type": "function",
278             "description": "Called when the browser's form data has been cleared.",
279             "optional": true,
280             "parameters": []
281           }
282         ]
283       },
284       {
285         "name": "removeHistory",
286         "description": "Clears the browser's history.",
287         "type": "function",
288         "parameters": [
289           {
290             "$ref": "RemovalOptions",
291             "name": "options"
292           },
293           {
294             "name": "callback",
295             "type": "function",
296             "description": "Called when the browser's history has cleared.",
297             "optional": true,
298             "parameters": []
299           }
300         ]
301       },
302       {
303         "name": "removeIndexedDB",
304         "description": "Clears websites' IndexedDB data.",
305         "type": "function",
306         "parameters": [
307           {
308             "$ref": "RemovalOptions",
309             "name": "options"
310           },
311           {
312             "name": "callback",
313             "type": "function",
314             "description": "Called when websites' IndexedDB data has been cleared.",
315             "optional": true,
316             "parameters": []
317           }
318         ]
319       },
320       {
321         "name": "removeLocalStorage",
322         "description": "Clears websites' local storage data.",
323         "type": "function",
324         "parameters": [
325           {
326             "$ref": "RemovalOptions",
327             "name": "options"
328           },
329           {
330             "name": "callback",
331             "type": "function",
332             "description": "Called when websites' local storage has been cleared.",
333             "optional": true,
334             "parameters": []
335           }
336         ]
337       },
338       {
339         "name": "removePluginData",
340         "description": "Clears plugins' data.",
341         "type": "function",
342         "parameters": [
343           {
344             "$ref": "RemovalOptions",
345             "name": "options"
346           },
347           {
348             "name": "callback",
349             "type": "function",
350             "description": "Called when plugins' data has been cleared.",
351             "optional": true,
352             "parameters": []
353           }
354         ]
355       },
356       {
357         "name": "removePasswords",
358         "description": "Clears the browser's stored passwords.",
359         "type": "function",
360         "parameters": [
361           {
362             "$ref": "RemovalOptions",
363             "name": "options"
364           },
365           {
366             "name": "callback",
367             "type": "function",
368             "description": "Called when the browser's passwords have been cleared.",
369             "optional": true,
370             "parameters": []
371           }
372         ]
373       },
374       {
375         "name": "removeWebSQL",
376         "description": "Clears websites' WebSQL data.",
377         "type": "function",
378         "parameters": [
379           {
380             "$ref": "RemovalOptions",
381             "name": "options"
382           },
383           {
384             "name": "callback",
385             "type": "function",
386             "description": "Called when websites' WebSQL databases have been cleared.",
387             "optional": true,
388             "parameters": []
389           }
390         ]
391       }
392     ]
393   }
394 ]