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

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

Issue 2727953005: [MD settings] ignore-extensions to no-extension-indicator (Closed)
Patch Set: wrapped lines 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 | « chrome/browser/resources/settings/system_page/system_page.html ('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 d153e0a6c12efba2e7af97f241d123a3c0e61d77..c9f241c43483cef6de8b1d89249d114263760dec 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
@@ -15,7 +15,7 @@ var CrPolicyPrefBehavior = {
* avoid showing an (extra) indicator here.
* @public
*/
- ignoreExtensions: Boolean,
+ noExtensionIndicator: Boolean,
},
/**
@@ -24,11 +24,6 @@ var CrPolicyPrefBehavior = {
* @return {boolean} True if |this.pref| is controlled by an enforced policy.
*/
isPrefEnforced: function() {
- if (this.ignoreExtensions &&
- this.pref.controlledBy ==
- chrome.settingsPrivate.ControlledBy.EXTENSION) {
- return false;
- }
return this.pref.enforcement == chrome.settingsPrivate.Enforcement.ENFORCED;
},
@@ -36,6 +31,11 @@ var CrPolicyPrefBehavior = {
* @return {boolean} True if |this.pref| has a recommended or enforced policy.
*/
hasPrefPolicyIndicator: function() {
+ if (this.noExtensionIndicator &&
+ this.pref.controlledBy ==
+ chrome.settingsPrivate.ControlledBy.EXTENSION) {
+ return false;
+ }
return this.isPrefEnforced() ||
this.pref.enforcement == chrome.settingsPrivate.Enforcement.RECOMMENDED;
},
« no previous file with comments | « chrome/browser/resources/settings/system_page/system_page.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698