| Index: chrome/browser/resources/settings/site_settings/site_list.js
|
| diff --git a/chrome/browser/resources/settings/site_settings/site_list.js b/chrome/browser/resources/settings/site_settings/site_list.js
|
| index 8501b1304b61ea0970e512ebba4be0d9163f72d2..6ed516903adbf12b6f8795a2e1a1ad36ab59ce18 100644
|
| --- a/chrome/browser/resources/settings/site_settings/site_list.js
|
| +++ b/chrome/browser/resources/settings/site_settings/site_list.js
|
| @@ -11,7 +11,7 @@ var iconControlledBy = {
|
| 'extension': 'cr:extension',
|
| 'HostedApp': 'cr:extension',
|
| 'platform_app': 'cr:extension',
|
| - 'policy' : 'cr:domain',
|
| + 'policy': 'cr:domain',
|
| };
|
|
|
| /**
|
| @@ -46,7 +46,9 @@ Polymer({
|
| */
|
| sites: {
|
| type: Array,
|
| - value: function() { return []; },
|
| + value: function() {
|
| + return [];
|
| + },
|
| },
|
|
|
| /**
|
| @@ -107,15 +109,14 @@ Polymer({
|
| },
|
| },
|
|
|
| - observers: [
|
| - 'configureWidget_(category, categorySubtype)'
|
| - ],
|
| + observers: ['configureWidget_(category, categorySubtype)'],
|
|
|
| ready: function() {
|
| - this.addWebUIListener('contentSettingSitePermissionChanged',
|
| + this.addWebUIListener(
|
| + 'contentSettingSitePermissionChanged',
|
| this.siteWithinCategoryChanged_.bind(this));
|
| - this.addWebUIListener('onIncognitoStatusChanged',
|
| - this.onIncognitoStatusChanged_.bind(this));
|
| + this.addWebUIListener(
|
| + 'onIncognitoStatusChanged', this.onIncognitoStatusChanged_.bind(this));
|
| },
|
|
|
| /**
|
| @@ -225,10 +226,10 @@ Polymer({
|
| this.processExceptions_(lists);
|
| }.bind(this));
|
| } else {
|
| - this.browserProxy_.getExceptionList(this.category).then(
|
| - function(exceptionList) {
|
| - this.processExceptions_([exceptionList]);
|
| - }.bind(this));
|
| + this.browserProxy_.getExceptionList(this.category)
|
| + .then(function(exceptionList) {
|
| + this.processExceptions_([exceptionList]);
|
| + }.bind(this));
|
| }
|
| },
|
|
|
| @@ -254,18 +255,17 @@ Polymer({
|
| var promiseList = [];
|
| for (var type in settings.ContentSettingsTypes) {
|
| if (settings.ContentSettingsTypes[type] ==
|
| - settings.ContentSettingsTypes.PROTOCOL_HANDLERS ||
|
| + settings.ContentSettingsTypes.PROTOCOL_HANDLERS ||
|
| settings.ContentSettingsTypes[type] ==
|
| - settings.ContentSettingsTypes.USB_DEVICES ||
|
| + settings.ContentSettingsTypes.USB_DEVICES ||
|
| settings.ContentSettingsTypes[type] ==
|
| - settings.ContentSettingsTypes.ZOOM_LEVELS) {
|
| + settings.ContentSettingsTypes.ZOOM_LEVELS) {
|
| // Some categories store their data in a custom way.
|
| continue;
|
| }
|
|
|
| - promiseList.push(
|
| - this.browserProxy_.getExceptionList(
|
| - settings.ContentSettingsTypes[type]));
|
| + promiseList.push(this.browserProxy_.getExceptionList(
|
| + settings.ContentSettingsTypes[type]));
|
| }
|
|
|
| return Promise.all(promiseList);
|
| @@ -328,7 +328,7 @@ Polymer({
|
| return comparison;
|
| });
|
| }
|
| - var results = /** @type {!Array<SiteException>} */([]);
|
| + var results = /** @type {!Array<SiteException>} */ ([]);
|
| var lastOrigin = '';
|
| var lastEmbeddingOrigin = '';
|
| for (var i = 0; i < sites.length; ++i) {
|
| @@ -385,7 +385,8 @@ Polymer({
|
| onOriginTap_: function(event) {
|
| if (!this.enableSiteSettings_)
|
| return;
|
| - settings.navigateTo(settings.Route.SITE_SETTINGS_SITE_DETAILS,
|
| + settings.navigateTo(
|
| + settings.Route.SITE_SETTINGS_SITE_DETAILS,
|
| new URLSearchParams('site=' + event.model.item.origin));
|
| },
|
|
|
| @@ -441,8 +442,8 @@ Polymer({
|
| */
|
| computeSiteDescription_: function(item) {
|
| if (item.incognito && item.embeddingDisplayName.length > 0) {
|
| - return loadTimeData.getStringF('embeddedIncognitoSite',
|
| - item.embeddingDisplayName);
|
| + return loadTimeData.getStringF(
|
| + 'embeddedIncognitoSite', item.embeddingDisplayName);
|
| }
|
|
|
| if (item.incognito)
|
| @@ -456,8 +457,8 @@ Polymer({
|
| */
|
| onShowActionMenuTap_: function(e) {
|
| this.actionMenuSite_ = e.model.item;
|
| - /** @type {!CrActionMenuElement} */ (
|
| - this.$$('dialog[is=cr-action-menu]')).showAt(
|
| + /** @type {!CrActionMenuElement} */ (this.$$('dialog[is=cr-action-menu]'))
|
| + .showAt(
|
| /** @type {!Element} */ (
|
| Polymer.dom(/** @type {!Event} */ (e)).localTarget));
|
| },
|
| @@ -465,7 +466,7 @@ Polymer({
|
| /** @private */
|
| closeActionMenu_: function() {
|
| this.actionMenuSite_ = null;
|
| - /** @type {!CrActionMenuElement} */ (
|
| - this.$$('dialog[is=cr-action-menu]')).close();
|
| + /** @type {!CrActionMenuElement} */ (this.$$('dialog[is=cr-action-menu]'))
|
| + .close();
|
| },
|
| });
|
|
|