Index: ui/webui/resources/cr_elements/v1_0/policy/cr_policy_pref_behavior.js |
diff --git a/ui/webui/resources/cr_elements/v1_0/policy/cr_policy_pref_behavior.js b/ui/webui/resources/cr_elements/v1_0/policy/cr_policy_pref_behavior.js |
deleted file mode 100644 |
index d8897da69b91199f611fccf195fac55a01696e59..0000000000000000000000000000000000000000 |
--- a/ui/webui/resources/cr_elements/v1_0/policy/cr_policy_pref_behavior.js |
+++ /dev/null |
@@ -1,45 +0,0 @@ |
-// Copyright 2015 The Chromium Authors. All rights reserved. |
-// Use of this source code is governed by a BSD-style license that can be |
-// found in the LICENSE file. |
- |
-/** |
- * @fileoverview Behavior for policy controlled settings prefs. |
- */ |
- |
-/** @polymerBehavior */ |
-var CrPolicyPrefBehavior = { |
- /** |
- * @param {!chrome.settingsPrivate.PrefObject} pref |
- * @return {boolean} True if the pref is controlled by an enforced policy. |
- */ |
- isPrefPolicyControlled: function(pref) { |
- return pref.policyEnforcement == |
- chrome.settingsPrivate.PolicyEnforcement.ENFORCED; |
- }, |
- |
- /** |
- * @param {chrome.settingsPrivate.PolicySource} source |
- * @param {chrome.settingsPrivate.PolicyEnforcement} enforcement |
- * @return {CrPolicyIndicatorType} The indicator type based on |source| and |
- * |enforcement|. |
- */ |
- getIndicatorType: function(source, enforcement) { |
- if (enforcement == chrome.settingsPrivate.PolicyEnforcement.RECOMMENDED) |
- return CrPolicyIndicatorType.RECOMMENDED; |
- if (enforcement == chrome.settingsPrivate.PolicyEnforcement.ENFORCED) { |
- switch (source) { |
- case chrome.settingsPrivate.PolicySource.PRIMARY_USER: |
- return CrPolicyIndicatorType.PRIMARY_USER; |
- case chrome.settingsPrivate.PolicySource.OWNER: |
- return CrPolicyIndicatorType.OWNER; |
- case chrome.settingsPrivate.PolicySource.USER_POLICY: |
- return CrPolicyIndicatorType.USER_POLICY; |
- case chrome.settingsPrivate.PolicySource.DEVICE_POLICY: |
- return CrPolicyIndicatorType.DEVICE_POLICY; |
- case chrome.settingsPrivate.PolicySource.EXTENSION: |
- return CrPolicyIndicatorType.EXTENSION; |
- } |
- } |
- return CrPolicyIndicatorType.NONE; |
- }, |
-}; |