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

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

Issue 2494943003: [MD settings] show full origin in content settings exceptions (Closed)
Patch Set: unit test 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
« no previous file with comments | « no previous file | chrome/test/data/webui/settings/site_list_tests.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 Behavior common to Site Settings classes. 6 * @fileoverview Behavior common to Site Settings classes.
7 */ 7 */
8 8
9 /** @polymerBehavior */ 9 /** @polymerBehavior */
10 var SiteSettingsBehaviorImpl = { 10 var SiteSettingsBehaviorImpl = {
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 430
431 /** 431 /**
432 * Convert an exception (received from the C++ handler) to a full 432 * Convert an exception (received from the C++ handler) to a full
433 * SiteException. 433 * SiteException.
434 * @param {!Object} exception The raw site exception from C++. 434 * @param {!Object} exception The raw site exception from C++.
435 * @return {SiteException} The expanded (full) SiteException. 435 * @return {SiteException} The expanded (full) SiteException.
436 * @private 436 * @private
437 */ 437 */
438 expandSiteException: function(exception) { 438 expandSiteException: function(exception) {
439 var origin = exception.origin; 439 var origin = exception.origin;
440 var url = this.toUrl(origin); 440 // TODO(dschuyler): If orginForDisplay becomes different from origin in the
441 var originForDisplay = url ? this.sanitizePort(url.origin) : origin; 441 // site settings, that filtering would happen here. If that doesn't happen
442 // then originForDisplay should be removed (it's redundant with origin).
443 // e.g. var originForDisplay = someFilter(origin);
442 444
443 var embeddingOrigin = exception.embeddingOrigin; 445 var embeddingOrigin = exception.embeddingOrigin;
444 var embeddingOriginForDisplay = ''; 446 var embeddingOriginForDisplay = '';
445 if (origin != embeddingOrigin) { 447 if (origin != embeddingOrigin) {
446 embeddingOriginForDisplay = 448 embeddingOriginForDisplay =
447 this.getEmbedderString(embeddingOrigin, this.category); 449 this.getEmbedderString(embeddingOrigin, this.category);
448 } 450 }
449 451
450 return { 452 return {
451 origin: origin, 453 origin: origin,
452 originForDisplay: originForDisplay, 454 originForDisplay: origin,
453 embeddingOrigin: embeddingOrigin, 455 embeddingOrigin: embeddingOrigin,
454 embeddingOriginForDisplay: embeddingOriginForDisplay, 456 embeddingOriginForDisplay: embeddingOriginForDisplay,
455 incognito: exception.incognito, 457 incognito: exception.incognito,
456 setting: exception.setting, 458 setting: exception.setting,
457 source: exception.source, 459 source: exception.source,
458 }; 460 };
459 }, 461 },
460 462
461 }; 463 };
462 464
463 /** @polymerBehavior */ 465 /** @polymerBehavior */
464 var SiteSettingsBehavior = [SiteSettingsBehaviorImpl]; 466 var SiteSettingsBehavior = [SiteSettingsBehaviorImpl];
OLDNEW
« no previous file with comments | « no previous file | chrome/test/data/webui/settings/site_list_tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698