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

Side by Side Diff: chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js

Issue 2476753002: [MD settings] get cookie details from site without transfering cookie tree (Closed)
Patch Set: closure fix Created 4 years, 1 month 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 * @fileoverview A helper object used from the "Site Settings" section to 6 * @fileoverview A helper object used from the "Site Settings" section to
7 * interact with the content settings prefs. 7 * interact with the content settings prefs.
8 */ 8 */
9 9
10 /** 10 /**
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 SiteSettingsPrefsBrowserProxy.prototype = { 81 SiteSettingsPrefsBrowserProxy.prototype = {
82 /** 82 /**
83 * Sets the default value for a site settings category. 83 * Sets the default value for a site settings category.
84 * @param {string} contentType The name of the category to change. 84 * @param {string} contentType The name of the category to change.
85 * @param {string} defaultValue The name of the value to set as default. 85 * @param {string} defaultValue The name of the value to set as default.
86 */ 86 */
87 setDefaultValueForContentType: function(contentType, defaultValue) {}, 87 setDefaultValueForContentType: function(contentType, defaultValue) {},
88 88
89 /** 89 /**
90 * Gets the cookie details for a particular site.
91 * @param {string} site The name of the site.
92 * @return {!Promise<!CookieDataSummaryItem>}
93 */
94 getCookieDetails: function(site) {},
95
96 /**
90 * Gets the default value for a site settings category. 97 * Gets the default value for a site settings category.
91 * @param {string} contentType The name of the category to query. 98 * @param {string} contentType The name of the category to query.
92 * @return {Promise<string>} The string value of the default setting. 99 * @return {!Promise<string>} The string value of the default setting.
93 */ 100 */
94 getDefaultValueForContentType: function(contentType) {}, 101 getDefaultValueForContentType: function(contentType) {},
95 102
96 /** 103 /**
97 * Gets the exceptions (site list) for a particular category. 104 * Gets the exceptions (site list) for a particular category.
98 * @param {string} contentType The name of the category to query. 105 * @param {string} contentType The name of the category to query.
99 * @return {Promise<Array<SiteException>>} 106 * @return {!Promise<!Array<!SiteException>>}
100 */ 107 */
101 getExceptionList: function(contentType) {}, 108 getExceptionList: function(contentType) {},
102 109
103 /** 110 /**
104 * Gets the exception details for a particular site. 111 * Gets the exception details for a particular site.
105 * @param {string} site The name of the site. 112 * @param {string} site The name of the site.
106 * @return {Promise<SiteException>} 113 * @return {!Promise<!SiteException>}
107 */ 114 */
108 getSiteDetails: function(site) {}, 115 getSiteDetails: function(site) {},
109 116
110 /** 117 /**
111 * Resets the category permission for a given origin (expressed as primary 118 * Resets the category permission for a given origin (expressed as primary
112 * and secondary patterns). 119 * and secondary patterns).
113 * @param {string} primaryPattern The origin to change (primary pattern). 120 * @param {string} primaryPattern The origin to change (primary pattern).
114 * @param {string} secondaryPattern The embedding origin to change 121 * @param {string} secondaryPattern The embedding origin to change
115 * (secondary pattern). 122 * (secondary pattern).
116 * @param {string} contentType The name of the category to reset. 123 * @param {string} contentType The name of the category to reset.
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 * Fetches a list of all USB devices and the sites permitted to use them. 221 * Fetches a list of all USB devices and the sites permitted to use them.
215 * @return {!Promise<!Array<!UsbDeviceEntry>>} The list of USB devices. 222 * @return {!Promise<!Array<!UsbDeviceEntry>>} The list of USB devices.
216 */ 223 */
217 fetchUsbDevices: function() {}, 224 fetchUsbDevices: function() {},
218 225
219 /** 226 /**
220 * Removes a particular USB device object permission by origin and embedding 227 * Removes a particular USB device object permission by origin and embedding
221 * origin. 228 * origin.
222 * @param {string} origin The origin to look up the permission for. 229 * @param {string} origin The origin to look up the permission for.
223 * @param {string} embeddingOrigin the embedding origin to look up. 230 * @param {string} embeddingOrigin the embedding origin to look up.
224 * @param {UsbDeviceDetails} usbDevice The USB device to revoke permission 231 * @param {!UsbDeviceDetails} usbDevice The USB device to revoke permission
225 * for. 232 * for.
226 */ 233 */
227 removeUsbDevice: function(origin, embeddingOrigin, usbDevice) {}, 234 removeUsbDevice: function(origin, embeddingOrigin, usbDevice) {},
228 235
229 /** 236 /**
230 * Fetches the incognito status of the current profile (whether an icognito 237 * Fetches the incognito status of the current profile (whether an icognito
231 * profile exists). Returns the results via onIncognitoStatusChanged. 238 * profile exists). Returns the results via onIncognitoStatusChanged.
232 */ 239 */
233 updateIncognitoStatus: function() {}, 240 updateIncognitoStatus: function() {},
234 241
(...skipping 20 matching lines...) Expand all
255 // during testing. 262 // during testing.
256 cr.addSingletonGetter(SiteSettingsPrefsBrowserProxyImpl); 263 cr.addSingletonGetter(SiteSettingsPrefsBrowserProxyImpl);
257 264
258 SiteSettingsPrefsBrowserProxyImpl.prototype = { 265 SiteSettingsPrefsBrowserProxyImpl.prototype = {
259 /** @override */ 266 /** @override */
260 setDefaultValueForContentType: function(contentType, defaultValue) { 267 setDefaultValueForContentType: function(contentType, defaultValue) {
261 chrome.send('setDefaultValueForContentType', [contentType, defaultValue]); 268 chrome.send('setDefaultValueForContentType', [contentType, defaultValue]);
262 }, 269 },
263 270
264 /** @override */ 271 /** @override */
272 getCookieDetails: function(site) {
273 return cr.sendWithPromise('getCookieDetails', site);
274 },
275
276 /** @override */
265 getDefaultValueForContentType: function(contentType) { 277 getDefaultValueForContentType: function(contentType) {
266 return cr.sendWithPromise('getDefaultValueForContentType', contentType); 278 return cr.sendWithPromise('getDefaultValueForContentType', contentType);
267 }, 279 },
268 280
269 /** @override */ 281 /** @override */
270 getExceptionList: function(contentType) { 282 getExceptionList: function(contentType) {
271 return cr.sendWithPromise('getExceptionList', contentType); 283 return cr.sendWithPromise('getExceptionList', contentType);
272 }, 284 },
273 285
274 /** @override */ 286 /** @override */
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 removeZoomLevel: function(host) { 380 removeZoomLevel: function(host) {
369 chrome.send('removeZoomLevel', [host]); 381 chrome.send('removeZoomLevel', [host]);
370 }, 382 },
371 }; 383 };
372 384
373 return { 385 return {
374 SiteSettingsPrefsBrowserProxy: SiteSettingsPrefsBrowserProxy, 386 SiteSettingsPrefsBrowserProxy: SiteSettingsPrefsBrowserProxy,
375 SiteSettingsPrefsBrowserProxyImpl: SiteSettingsPrefsBrowserProxyImpl, 387 SiteSettingsPrefsBrowserProxyImpl: SiteSettingsPrefsBrowserProxyImpl,
376 }; 388 };
377 }); 389 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698