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

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

Issue 2528803002: MD Settings: Internet: Add/fix remaining policy items (Closed)
Patch Set: Rebase Created 4 years 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 32b27beaead50e0f337b6a947a6b7f080e473be2..c0520169b3801e07e3beadb6bb132f7d64daf5c5 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
@@ -68,4 +68,27 @@ var CrPolicyNetworkBehavior = {
// If no 'Editable' sub-property exists, the policy value is enforced.
return true;
},
+
+ /**
+ * @param {String} source
+ * @return {boolean}
+ * @private
+ */
+ isPolicySource: function(source) {
+ return source == CrOnc.Source.DEVICE_POLICY ||
+ source == CrOnc.Source.USER_POLICY;
+ },
+
+ /**
+ * @param {String} source
+ * @return {!CrPolicyIndicatorType}
+ * @private
+ */
+ getIndicatorTypeForSource: function(source) {
+ if (source == CrOnc.Source.DEVICE_POLICY)
+ return CrPolicyIndicatorType.DEVICE_POLICY;
+ if (source == CrOnc.Source.USER_POLICY)
+ return CrPolicyIndicatorType.USER_POLICY;
+ return CrPolicyIndicatorType.NONE;
+ },
};

Powered by Google App Engine
This is Rietveld 408576698