Chromium Code Reviews| 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..464f2feea0ecf86743ac9252bc791c1b1e67a679 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(source) { |
|
Dan Beam
2016/11/29 05:25:34
please use
isPolicySource: function(source) {
sy
stevenjb
2016/11/30 22:58:19
I'm aware. Old habits. Thanks for catching. Done.
|
| + return source == CrOnc.Source.DEVICE_POLICY || |
| + source == CrOnc.Source.USER_POLICY; |
| + }, |
| + |
| + /** |
| + * @param {String} source |
| + * @return {!CrPolicyIndicatorType} |
| + * @private |
| + */ |
| + getIndicatorTypeForSource(source) { |
| + if (source == CrOnc.Source.DEVICE_POLICY) |
| + return CrPolicyIndicatorType.DEVICE_POLICY; |
| + if (source == CrOnc.Source.USER_POLICY) |
| + return CrPolicyIndicatorType.USER_POLICY; |
| + return CrPolicyIndicatorType.NONE; |
| + }, |
| }; |