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

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

Issue 2131953002: Site Settings Desktop: Implement protocol handler section. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback Created 4 years, 5 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 }, 236 },
237 237
238 /** 238 /**
239 * Retrieves a list of all known sites (any category/setting). 239 * Retrieves a list of all known sites (any category/setting).
240 * @return {!Promise} 240 * @return {!Promise}
241 * @private 241 * @private
242 */ 242 */
243 getAllSitesList_: function() { 243 getAllSitesList_: function() {
244 var promiseList = []; 244 var promiseList = [];
245 for (var type in settings.ContentSettingsTypes) { 245 for (var type in settings.ContentSettingsTypes) {
246 if (settings.ContentSettingsTypes[type] ==
247 settings.ContentSettingsTypes.PROTOCOL_HANDLERS) {
248 // Protocol handlers don't have data stored the way all the other
249 // categories do.
250 continue;
251 }
252
246 promiseList.push( 253 promiseList.push(
247 this.browserProxy_.getExceptionList( 254 this.browserProxy_.getExceptionList(
248 settings.ContentSettingsTypes[type])); 255 settings.ContentSettingsTypes[type]));
249 } 256 }
250 257
251 return Promise.all(promiseList); 258 return Promise.all(promiseList);
252 }, 259 },
253 260
254 /** 261 /**
255 * Appends to |list| the sites for a given category and subtype. 262 * Appends to |list| the sites for a given category and subtype.
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 // is redundant to also list all the sites that are blocked. 464 // is redundant to also list all the sites that are blocked.
458 if (this.isAllowList_()) 465 if (this.isAllowList_())
459 return true; 466 return true;
460 467
461 if (this.isSessionOnlyList_()) 468 if (this.isSessionOnlyList_())
462 return siteList.length > 0; 469 return siteList.length > 0;
463 470
464 return toggleState; 471 return toggleState;
465 }, 472 },
466 }); 473 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698