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

Unified Diff: chrome/browser/resources/settings/site_settings/site_list.js

Issue 2354313002: Site Settings Desktop: Flesh out controlled exceptions a little more. (Closed)
Patch Set: Polish 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 side-by-side diff with in-line comments
Download patch
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));
},

Powered by Google App Engine
This is Rietveld 408576698