Index: ui/webui/resources/cr_elements/policy/cr_policy_pref_indicator.js |
diff --git a/ui/webui/resources/cr_elements/policy/cr_policy_pref_indicator.js b/ui/webui/resources/cr_elements/policy/cr_policy_pref_indicator.js |
index ec6fb5bd94a6d79d2b1afbeedccf8248f7163027..24388a169e370a77358ef416affe79bddec23099 100644 |
--- a/ui/webui/resources/cr_elements/policy/cr_policy_pref_indicator.js |
+++ b/ui/webui/resources/cr_elements/policy/cr_policy_pref_indicator.js |
@@ -1,3 +1,4 @@ |
+ |
michaelpg
2016/12/09 03:23:10
revert blank line
stevenjb
2016/12/09 16:51:47
Done.
|
// 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. |
@@ -15,18 +16,9 @@ Polymer({ |
/** |
* 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 language_detail_page). |
+ * @type {!chrome.settingsPrivate.PrefObject|undefined} |
*/ |
- controllingUser: {type: String, value: ''}, |
+ pref: Object, |
/** |
* Which indicator type to show (or NONE). |
@@ -41,17 +33,16 @@ Polymer({ |
/** |
* @param {CrPolicyIndicatorType} type |
- * @param {?chrome.settingsPrivate.PrefObject} pref |
+ * @param {!chrome.settingsPrivate.PrefObject} pref |
* @return {string} The tooltip text for |type|. |
* @private |
*/ |
- getTooltip_: function(type, pref, controllingUser) { |
+ getTooltip_: function(type, pref) { |
if (type == CrPolicyIndicatorType.RECOMMENDED) { |
if (pref && pref.value == pref.recommendedValue) |
return this.i18n_('controlledSettingRecommendedMatches'); |
return this.i18n_('controlledSettingRecommendedDiffers'); |
} |
- var name = pref ? pref.controlledByName : controllingUser; |
- return this.getPolicyIndicatorTooltip(type, name); |
+ return this.getPolicyIndicatorTooltip(type, pref.controlledByName || ''); |
} |
}); |