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

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

Issue 2237823003: Site Settings Desktop: Implement USB devices section. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 6 * @fileoverview
7 * 'settings-site-list' shows a list of Allowed and Blocked sites for a given 7 * 'settings-site-list' shows a list of Allowed and Blocked sites for a given
8 * category. 8 * category.
9 */ 9 */
10 Polymer({ 10 Polymer({
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 247
248 /** 248 /**
249 * Retrieves a list of all known sites (any category/setting). 249 * Retrieves a list of all known sites (any category/setting).
250 * @return {!Promise} 250 * @return {!Promise}
251 * @private 251 * @private
252 */ 252 */
253 getAllSitesList_: function() { 253 getAllSitesList_: function() {
254 var promiseList = []; 254 var promiseList = [];
255 for (var type in settings.ContentSettingsTypes) { 255 for (var type in settings.ContentSettingsTypes) {
256 if (settings.ContentSettingsTypes[type] == 256 if (settings.ContentSettingsTypes[type] ==
257 settings.ContentSettingsTypes.PROTOCOL_HANDLERS) { 257 settings.ContentSettingsTypes.PROTOCOL_HANDLERS ||
258 // Protocol handlers don't have data stored the way all the other 258 settings.ContentSettingsTypes[type] ==
259 // categories do. 259 settings.ContentSettingsTypes.USB_DEVICES) {
260 // Protocol handlers and USB devices don't have data stored the way all
261 // the other categories do.
260 continue; 262 continue;
261 } 263 }
262 264
263 promiseList.push( 265 promiseList.push(
264 this.browserProxy_.getExceptionList( 266 this.browserProxy_.getExceptionList(
265 settings.ContentSettingsTypes[type])); 267 settings.ContentSettingsTypes[type]));
266 } 268 }
267 269
268 return Promise.all(promiseList); 270 return Promise.all(promiseList);
269 }, 271 },
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 // is redundant to also list all the sites that are blocked. 475 // is redundant to also list all the sites that are blocked.
474 if (this.isAllowList_()) 476 if (this.isAllowList_())
475 return true; 477 return true;
476 478
477 if (this.isSessionOnlyList_()) 479 if (this.isSessionOnlyList_())
478 return siteList.length > 0; 480 return siteList.length > 0;
479 481
480 return toggleState; 482 return toggleState;
481 }, 483 },
482 }); 484 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698