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

Unified Diff: chrome/browser/resources/options/content_settings.js

Issue 1855393006: [Chrome Settings UI] If User Exceptions are not allowed, prevent editing / viewing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix refactoring bug. Created 4 years, 8 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/options/content_settings.js
diff --git a/chrome/browser/resources/options/content_settings.js b/chrome/browser/resources/options/content_settings.js
index 33cac98257f4c9a08e87a3fa3c3db94a921c6203..5f85afbb257961ff7bcf3c52db9afcc3a6dde9fc 100644
--- a/chrome/browser/resources/options/content_settings.js
+++ b/chrome/browser/resources/options/content_settings.js
@@ -131,6 +131,18 @@ cr.define('options', function() {
};
/**
+ * Updates UI to enable/disable user preference exceptions for a particular
+ * content setting.
+ * @param {string} type The content settings type being updated.
+ * @param {boolean} maybeEnableEdit Whether user may view/edit exceptions.
Evan Stade 2016/04/06 21:32:51 maybe is a confusing word and should generally be
huangs 2016/04/07 04:14:44 Replaced with "allow".
+ */
+ ContentSettings.setMaybeEnablePrefExceptions = function(type,
+ maybeEnableEdit) {
+ // Update exceptions UI window.
+ this.getExceptionsList(type, 'normal').setMaybeEnableEdit(maybeEnableEdit);
+ };
+
+ /**
* Initializes an exceptions list.
* @param {string} type The content type that we are setting exceptions for.
* @param {Array<options.Exception>} exceptions An array of pairs, where the

Powered by Google App Engine
This is Rietveld 408576698