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

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

Issue 2269963003: Site Settings Desktop: Fix bug with deleting manually added exceptions. (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 * 'site-list' shows a list of Allowed and Blocked sites for a given 7 * 'site-list' shows a list of Allowed and Blocked sites for a given
8 * category. 8 * category.
9 */ 9 */
10 Polymer({ 10 Polymer({
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 return comparison; 342 return comparison;
343 }); 343 });
344 var results = []; 344 var results = [];
345 var lastOrigin = ''; 345 var lastOrigin = '';
346 var lastEmbeddingOrigin = ''; 346 var lastEmbeddingOrigin = '';
347 for (var i = 0; i < sites.length; ++i) { 347 for (var i = 0; i < sites.length; ++i) {
348 var origin = sites[i].origin; 348 var origin = sites[i].origin;
349 var originForDisplay = this.sanitizePort(origin.replace('[*.]', '')); 349 var originForDisplay = this.sanitizePort(origin.replace('[*.]', ''));
350 350
351 var embeddingOrigin = sites[i].embeddingOrigin; 351 var embeddingOrigin = sites[i].embeddingOrigin;
352 if (this.category == settings.ContentSettingsTypes.GEOLOCATION) {
353 if (embeddingOrigin == '')
354 embeddingOrigin = '*';
355 }
356 var embeddingOriginForDisplay = ''; 352 var embeddingOriginForDisplay = '';
357 if (embeddingOrigin != '' && origin != embeddingOrigin) { 353 if (origin != embeddingOrigin) {
358 embeddingOriginForDisplay = loadTimeData.getStringF( 354 embeddingOriginForDisplay =
359 'embeddedOnHost', this.sanitizePort(embeddingOrigin)); 355 this.getEmbedderString(embeddingOrigin, this.category);
Finnur 2016/08/24 16:21:31 I really want to use the embedder string also in t
360 } 356 }
361 357
362 // The All Sites category can contain duplicates (from other categories). 358 // The All Sites category can contain duplicates (from other categories).
363 if (originForDisplay == lastOrigin && 359 if (originForDisplay == lastOrigin &&
364 embeddingOriginForDisplay == lastEmbeddingOrigin) { 360 embeddingOriginForDisplay == lastEmbeddingOrigin) {
365 continue; 361 continue;
366 } 362 }
367 363
368 results.push({ 364 results.push({
369 origin: origin, 365 origin: origin,
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 // is redundant to also list all the sites that are blocked. 472 // is redundant to also list all the sites that are blocked.
477 if (this.isAllowList_()) 473 if (this.isAllowList_())
478 return true; 474 return true;
479 475
480 if (this.isSessionOnlyList_()) 476 if (this.isSessionOnlyList_())
481 return siteList.length > 0; 477 return siteList.length > 0;
482 478
483 return toggleState; 479 return toggleState;
484 }, 480 },
485 }); 481 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698