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

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: closure 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
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..28f8d3db58e289a5fe28797dbd771f1402183c5f 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
@@ -13,8 +13,7 @@ var CrPolicyPrefBehavior = {
* @return {boolean} True if the pref is controlled by an enforced policy.
*/
isPrefPolicyControlled: function(pref) {
- return pref.enforcement == chrome.settingsPrivate.Enforcement.ENFORCED &&
- pref.controlledBy != chrome.settingsPrivate.ControlledBy.EXTENSION;
Dan Beam 2017/02/24 04:44:20 policy != extension
Dan Beam 2017/02/24 04:45:45 as in: this method is named "isPrefPolicyControlle
dschuyler 2017/02/24 21:36:46 Acknowledged.
dschuyler 2017/02/24 21:36:46 Ah, and this function isn't really checking whethe
+ return pref.enforcement == chrome.settingsPrivate.Enforcement.ENFORCED;
},
/**
@@ -36,6 +35,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;
}
}
return CrPolicyIndicatorType.NONE;

Powered by Google App Engine
This is Rietveld 408576698