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

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

Issue 2868223002: [MD settings] content exceptions with embeddingOrigin as read-only (Closed)
Patch Set: review changes Created 3 years, 7 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 51b7f3aefd75125a5e8a407b67b9e3e03f699ec4..2ff2e966c092ad81322818a9d90e567ceabffabc 100644
--- a/chrome/browser/resources/settings/site_settings/site_list.js
+++ b/chrome/browser/resources/settings/site_settings/site_list.js
@@ -184,26 +184,27 @@ Polymer({
},
/**
- * @param {chrome.settingsPrivate.Enforcement} enforcement The level of
- * enforcement.
+ * @param {!SiteException} exception The content setting exception.
* @param {boolean} readOnlyList Whether the site exception list is read-only.
* @return {boolean}
* @private
*/
- isResetButtonHidden_: function(enforcement, readOnlyList) {
- return enforcement == chrome.settingsPrivate.Enforcement.ENFORCED ||
- this.allSites || !readOnlyList;
+ shouldHideResetButton_: function(exception, readOnlyList) {
+ return exception.enforcement ==
+ chrome.settingsPrivate.Enforcement.ENFORCED ||
+ this.allSites || !(readOnlyList || !!exception.embeddingOrigin);
},
/**
- * @param {string} enforcement Whether the exception is controlled.
+ * @param {!SiteException} exception The content setting exception.
* @param {boolean} readOnlyList Whether the site exception list is read-only.
* @return {boolean}
* @private
*/
- isActionMenuHidden_: function(enforcement, readOnlyList) {
- return enforcement == chrome.settingsPrivate.Enforcement.ENFORCED ||
- this.allSites || readOnlyList;
+ shouldHideActionMenu_: function(exception, readOnlyList) {
+ return exception.enforcement ==
+ chrome.settingsPrivate.Enforcement.ENFORCED ||
+ this.allSites || readOnlyList || !!exception.embeddingOrigin;
},
/**
« no previous file with comments | « chrome/browser/resources/settings/site_settings/site_list.html ('k') | chrome/test/data/webui/settings/site_list_tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698