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

Unified Diff: ui/webui/resources/cr_elements/v1_0/policy/cr_policy_pref_indicator.js

Issue 1406023003: Elim cr_elements/v1_0 subdirectory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 2 months 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/v1_0/policy/cr_policy_pref_indicator.js
diff --git a/ui/webui/resources/cr_elements/v1_0/policy/cr_policy_pref_indicator.js b/ui/webui/resources/cr_elements/v1_0/policy/cr_policy_pref_indicator.js
deleted file mode 100644
index 769ba62f791f6f5508156fcb4f6993b8e4ecc376..0000000000000000000000000000000000000000
--- a/ui/webui/resources/cr_elements/v1_0/policy/cr_policy_pref_indicator.js
+++ /dev/null
@@ -1,59 +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 Polymer element for indicating policies that apply to an
- * element controlling a settings preference.
- *
- * @element cr-policy-pref-indicator
- */
-Polymer({
- is: 'cr-policy-pref-indicator',
-
- behaviors: [CrPolicyIndicatorBehavior, CrPolicyPrefBehavior],
-
- properties: {
- /**
- * Optional preference object associated with the indicator. Initialized to
- * null so that computed functions will get called if this is never set.
- * @type {?chrome.settingsPrivate.PrefObject}
- */
- pref: {type: Object, value: null},
-
- /**
- * Optional email of the user controlling the setting when the setting does
- * not correspond to a pref (Chrome OS only). Only used when pref is null.
- * Initialized to '' so that computed functions will get called if this is
- * never set. TODO(stevenjb/michaelpg): Create a separate indicator for
- * non-pref (i.e. explicitly set) indicators (see languyage_detail_page).
- */
- controllingUser: {type: String, value: ''},
-
- /**
- * Which indicator type to show (or NONE).
- * @type {CrPolicyIndicatorType}
- */
- indicatorType: {
- type: String,
- value: CrPolicyIndicatorType.NONE,
- computed: 'getIndicatorType(pref.policySource, pref.policyEnforcement)',
- },
- },
-
- /**
- * @param {CrPolicyIndicatorType} type
- * @param {?chrome.settingsPrivate.PrefObject} pref
- * @return {string} The tooltip text for |type|.
- * @private
- */
- getTooltip_: function(type, pref, controllingUser) {
- if (type == CrPolicyIndicatorType.RECOMMENDED) {
- if (pref && pref.value == pref.recommendedValue)
- return this.i18n_('controlledSettingRecommendedMatches');
- return this.i18n_('controlledSettingRecommendedDiffers');
- }
- var name = pref ? pref.policySourceName : controllingUser;
- return this.getPolicyIndicatorTooltip(type, name);
- }
-});

Powered by Google App Engine
This is Rietveld 408576698