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

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

Issue 2354313002: Site Settings Desktop: Flesh out controlled exceptions a little more. (Closed)
Patch Set: Address feedback Created 4 years, 3 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
« no previous file with comments | « chrome/browser/resources/settings/site_settings/site_list.js ('k') | no next file » | 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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 if (embeddingOrigin == '') { 411 if (embeddingOrigin == '') {
412 if (category != settings.ContentSettingsTypes.GEOLOCATION) 412 if (category != settings.ContentSettingsTypes.GEOLOCATION)
413 return ''; 413 return '';
414 return loadTimeData.getStringF('embeddedOnHost', '*'); 414 return loadTimeData.getStringF('embeddedOnHost', '*');
415 } 415 }
416 return loadTimeData.getStringF( 416 return loadTimeData.getStringF(
417 'embeddedOnHost', this.sanitizePort(embeddingOrigin)); 417 'embeddedOnHost', this.sanitizePort(embeddingOrigin));
418 }, 418 },
419 419
420 /** 420 /**
421 * Returns true if this exception is controlled by, for example, a policy or
422 * set by an extension.
423 * @param {string} source The source controlling the extension
424 * @return {boolean} Whether it is being controlled.
425 * @protected
426 */
427 isExceptionControlled_: function(source) {
428 return source != undefined && source != 'preference';
429 },
430
431 /**
421 * Returns the icon to use for a given site. 432 * Returns the icon to use for a given site.
422 * @param {string} site The url of the site to fetch the icon for. 433 * @param {string} site The url of the site to fetch the icon for.
423 * @return {string} The background-image style with the favicon. 434 * @return {string} The background-image style with the favicon.
424 * @private 435 * @private
425 */ 436 */
426 computeSiteIcon: function(site) { 437 computeSiteIcon: function(site) {
427 var url = this.ensureUrlHasScheme(site); 438 var url = this.ensureUrlHasScheme(site);
428 return 'background-image: ' + cr.icon.getFavicon(url); 439 return 'background-image: ' + cr.icon.getFavicon(url);
429 }, 440 },
430 441
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 incognito: exception.incognito, 498 incognito: exception.incognito,
488 setting: exception.setting, 499 setting: exception.setting,
489 source: exception.source, 500 source: exception.source,
490 }; 501 };
491 }, 502 },
492 503
493 }; 504 };
494 505
495 /** @polymerBehavior */ 506 /** @polymerBehavior */
496 var SiteSettingsBehavior = [SiteSettingsBehaviorImpl]; 507 var SiteSettingsBehavior = [SiteSettingsBehaviorImpl];
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/site_settings/site_list.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698