| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @fileoverview Behavior for policy controlled network properties. | 6 * @fileoverview Behavior for policy controlled network properties. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 /** @polymerBehavior */ | 9 /** @polymerBehavior */ |
| 10 var CrPolicyNetworkBehavior = { | 10 var CrPolicyNetworkBehavior = { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 // If no 'Editable' sub-property exists, the policy value is enforced. | 68 // If no 'Editable' sub-property exists, the policy value is enforced. |
| 69 return true; | 69 return true; |
| 70 }, | 70 }, |
| 71 | 71 |
| 72 /** | 72 /** |
| 73 * @param {string|undefined} source | 73 * @param {string|undefined} source |
| 74 * @return {boolean} | 74 * @return {boolean} |
| 75 * @private | 75 * @private |
| 76 */ | 76 */ |
| 77 isPolicySource: function(source) { | 77 isPolicySource: function(source) { |
| 78 return !!source && (source == CrOnc.Source.DEVICE_POLICY || | 78 return !!source && |
| 79 source == CrOnc.Source.USER_POLICY); | 79 (source == CrOnc.Source.DEVICE_POLICY || |
| 80 source == CrOnc.Source.USER_POLICY); |
| 80 }, | 81 }, |
| 81 | 82 |
| 82 /** | 83 /** |
| 83 * @param {string} source | 84 * @param {string} source |
| 84 * @return {!CrPolicyIndicatorType} | 85 * @return {!CrPolicyIndicatorType} |
| 85 * @private | 86 * @private |
| 86 */ | 87 */ |
| 87 getIndicatorTypeForSource: function(source) { | 88 getIndicatorTypeForSource: function(source) { |
| 88 if (source == CrOnc.Source.DEVICE_POLICY) | 89 if (source == CrOnc.Source.DEVICE_POLICY) |
| 89 return CrPolicyIndicatorType.DEVICE_POLICY; | 90 return CrPolicyIndicatorType.DEVICE_POLICY; |
| 90 if (source == CrOnc.Source.USER_POLICY) | 91 if (source == CrOnc.Source.USER_POLICY) |
| 91 return CrPolicyIndicatorType.USER_POLICY; | 92 return CrPolicyIndicatorType.USER_POLICY; |
| 92 return CrPolicyIndicatorType.NONE; | 93 return CrPolicyIndicatorType.NONE; |
| 93 }, | 94 }, |
| 94 }; | 95 }; |
| OLD | NEW |