Chromium Code Reviews| Index: chrome/browser/resources/settings/policy_controllable/policy_controllable.js |
| diff --git a/chrome/browser/resources/settings/policy_controllable/policy_controllable.js b/chrome/browser/resources/settings/policy_controllable/policy_controllable.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e43289471f970cae42776125efd1d7c454be42e4 |
| --- /dev/null |
| +++ b/chrome/browser/resources/settings/policy_controllable/policy_controllable.js |
| @@ -0,0 +1,16 @@ |
| +/** |
| + * @fileoverview Behavior to determine whether a pref is controlled by policy. |
| + */ |
| + |
| +/** @polymerBehavior */ |
| +var PolicyControllable = { |
| + /** |
| + * @param {?chrome.settingsPrivate.PrefObject} pref |
| + * @return {boolean} True if the pref is controlled by an enforced policy. |
| + */ |
| + isControlled: function(pref) { |
|
stevenjb
2015/09/21 20:41:43
nit: isPolicyControlled ?
Dan Beam
2015/09/21 22:27:11
+1
michaelpg
2015/09/22 02:22:57
Done.
michaelpg
2015/09/22 02:22:57
Acknowledged.
|
| + return !!pref && |
| + pref.policyEnforcement == |
| + chrome.settingsPrivate.PolicyEnforcement.ENFORCED; |
| + }, |
| +}; |