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

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

Issue 2467123003: Settings: Internet: Update proxy controlled indicator and fields. (Closed)
Patch Set: Rebase Created 4 years, 1 month 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_network_behavior.js
diff --git a/ui/webui/resources/cr_elements/policy/cr_policy_network_behavior.js b/ui/webui/resources/cr_elements/policy/cr_policy_network_behavior.js
index ec3f38e341eb957cc73e2f48b33ab9e355dd10dd..32b27beaead50e0f337b6a947a6b7f080e473be2 100644
--- a/ui/webui/resources/cr_elements/policy/cr_policy_network_behavior.js
+++ b/ui/webui/resources/cr_elements/policy/cr_policy_network_behavior.js
@@ -31,6 +31,26 @@ var CrPolicyNetworkBehavior = {
/**
* @param {!CrOnc.ManagedProperty|undefined} property
+ * @return {boolean} True if the network property is controlled by an
+ * extension.
+ */
+ isExtensionControlled: function(property) {
+ return typeof property == 'object' &&
+ property.Effective == 'ActiveExtension';
+ },
+
+ /**
+ * @param {!CrOnc.ManagedProperty|undefined} property
+ * @return {boolean} True if the network property is controlled by a policy
+ * or an extension.
+ */
+ isControlled: function(property) {
+ return this.isNetworkPolicyControlled(property) ||
+ this.isExtensionControlled(property);
+ },
+
+ /**
+ * @param {!CrOnc.ManagedProperty|undefined} property
* @return {boolean} True if the network property is enforced by a policy.
*/
isNetworkPolicyEnforced: function(property) {

Powered by Google App Engine
This is Rietveld 408576698