Chromium Code Reviews| 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 01ce665f7d62195566d945faae5671c37807684e..e127466a73b8f7144ddfedd5c7c9a6ee15ac8212 100644 |
| --- a/chrome/browser/resources/settings/site_settings/site_list.js |
| +++ b/chrome/browser/resources/settings/site_settings/site_list.js |
| @@ -186,12 +186,22 @@ Polymer({ |
| }, |
| /** |
| - * @param {string} source Where the setting came from. |
| - * @return {boolean} |
| - * @private |
| + * Returns which icon, if any, should represent the fact that this exception |
| + * is controlled. |
| + * @param {!SiteException} item The item from the list we're computing the |
| + * icon for. |
| + * @return {string} The icon to show (or blank, if none). |
| */ |
| - isPolicyControlled_: function(source) { |
| - return source == 'policy'; |
| + computeIconControlledBy_: function(item) { |
| + if (item.source == 'extension') |
| + return 'cr:extension'; |
| + if (item.source == 'HostedApp') |
| + return 'cr:extension'; |
| + if (item.source == 'platform_app') |
| + return 'cr:extension'; |
| + if (item.source == 'policy') |
| + return 'cr:domain'; |
| + return ''; |
|
dschuyler
2016/09/21 17:25:20
optional: A handful of conditionals is not a big d
Finnur
2016/09/22 12:58:00
Done.
|
| }, |
| /** |
| @@ -200,7 +210,7 @@ Polymer({ |
| * @private |
| */ |
| shouldShowMenu_: function(source) { |
| - return !(this.isPolicyControlled_(source) || this.allSites); |
| + return !(this.isExceptionControlled_(source) || this.allSites); |
| }, |
| /** |
| @@ -403,9 +413,6 @@ Polymer({ |
| */ |
| onOriginTap_: function(event) { |
| this.selectedSite = event.model.item; |
| - if (this.isPolicyControlled_(this.selectedSite.source)) |
| - return; |
|
Finnur
2016/09/21 16:45:24
I took this out because it doesn't make sense to m
dschuyler
2016/09/21 17:25:20
Acknowledged.
|
| - |
| settings.navigateTo(settings.Route.SITE_SETTINGS_SITE_DETAILS, |
| new URLSearchParams('site=' + this.selectedSite.origin)); |
| }, |