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

Unified Diff: ui/webui/resources/cr_elements/policy/cr_policy_pref_behavior.js

Issue 2708013003: [MD settings] show icon when content settings are controlled by an extension (Closed)
Patch Set: isPrefEnforced Created 3 years, 10 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
« no previous file with comments | « ui/webui/resources/cr_elements/policy/cr_policy_indicator_behavior.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/webui/resources/cr_elements/policy/cr_policy_pref_behavior.js
diff --git a/ui/webui/resources/cr_elements/policy/cr_policy_pref_behavior.js b/ui/webui/resources/cr_elements/policy/cr_policy_pref_behavior.js
index 0fd367c6238f3417266d038abf570cd81053fef5..064af8e2fac4876bf149379542dfb7ab1a47aadb 100644
--- a/ui/webui/resources/cr_elements/policy/cr_policy_pref_behavior.js
+++ b/ui/webui/resources/cr_elements/policy/cr_policy_pref_behavior.js
@@ -9,12 +9,13 @@
/** @polymerBehavior */
var CrPolicyPrefBehavior = {
/**
+ * Is the |pref| controlled by something that prevents user control of the
+ * preference.
* @param {!chrome.settingsPrivate.PrefObject} pref
- * @return {boolean} True if the pref is controlled by an enforced policy.
+ * @return {boolean} True if the pref is enforced.
*/
- isPrefPolicyControlled: function(pref) {
- return pref.enforcement == chrome.settingsPrivate.Enforcement.ENFORCED &&
- pref.controlledBy != chrome.settingsPrivate.ControlledBy.EXTENSION;
+ isPrefEnforced: function(pref) {
+ return pref.enforcement == chrome.settingsPrivate.Enforcement.ENFORCED;
},
/**
@@ -36,6 +37,8 @@ var CrPolicyPrefBehavior = {
return CrPolicyIndicatorType.USER_POLICY;
case chrome.settingsPrivate.ControlledBy.DEVICE_POLICY:
return CrPolicyIndicatorType.DEVICE_POLICY;
+ case chrome.settingsPrivate.ControlledBy.EXTENSION:
+ return CrPolicyIndicatorType.EXTENSION;
Dan Beam 2017/02/25 00:13:41 please show me screenshots of situations like a <c
dschuyler 2017/02/28 00:15:18 Done off-line.
}
}
return CrPolicyIndicatorType.NONE;
« no previous file with comments | « ui/webui/resources/cr_elements/policy/cr_policy_indicator_behavior.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698