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

Side by Side Diff: chrome/common/extensions/docs/examples/api/browsingData/basic/popup.js

Issue 9424036: Move `browsingData` extension API out of experimental. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebuilt docs. Created 8 years, 10 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
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 * This class wraps the popup's form, and performs the proper clearing of data 6 * This class wraps the popup's form, and performs the proper clearing of data
7 * based on the user's selections. It depends on the form containing a single 7 * based on the user's selections. It depends on the form containing a single
8 * select element with an id of 'timeframe', and a single button with an id of 8 * select element with an id of 'timeframe', and a single button with an id of
9 * 'button'. When you write actual code you should probably be a little more 9 * 'button'. When you write actual code you should probably be a little more
10 * accepting of variance, but this is just a sample app. :) 10 * accepting of variance, but this is just a sample app. :)
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 * state of `timeframe_` in order to pull a timeframe, then calls the clearing 102 * state of `timeframe_` in order to pull a timeframe, then calls the clearing
103 * method with appropriate arguments. 103 * method with appropriate arguments.
104 * 104 *
105 * @private 105 * @private
106 */ 106 */
107 handleClick_: function () { 107 handleClick_: function () {
108 var removal_start = this.parseMilliseconds_(this.timeframe_.value); 108 var removal_start = this.parseMilliseconds_(this.timeframe_.value);
109 if (removal_start !== undefined) { 109 if (removal_start !== undefined) {
110 this.button_.setAttribute('disabled', 'disabled'); 110 this.button_.setAttribute('disabled', 'disabled');
111 this.button_.innerText = 'Clearing...'; 111 this.button_.innerText = 'Clearing...';
112 chrome.experimental.browsingData.remove(removal_start, { 112 chrome.browsingData.remove(removal_start, {
113 "appcache": true, 113 "appcache": true,
114 "cache": true, 114 "cache": true,
115 "cookies": true, 115 "cookies": true,
116 "downloads": true, 116 "downloads": true,
117 "fileSystems": true, 117 "fileSystems": true,
118 "formData": true, 118 "formData": true,
119 "history": true, 119 "history": true,
120 "indexedDB": true, 120 "indexedDB": true,
121 "localStorage": true, 121 "localStorage": true,
122 "originBoundCertificates": true,
122 "pluginData": true, 123 "pluginData": true,
123 "passwords": true, 124 "passwords": true,
124 "webSQL": true 125 "webSQL": true
125 }, this.handleCallback_.bind(this)); 126 }, this.handleCallback_.bind(this));
126 } 127 }
127 } 128 }
128 }; 129 };
129 130
130 document.addEventListener('DOMContentLoaded', function () { 131 document.addEventListener('DOMContentLoaded', function () {
131 window.PC = new PopupController(); 132 window.PC = new PopupController();
132 }); 133 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698