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

Unified Diff: ui/webui/resources/cr_elements/policy/cr_policy_network_indicator.js

Issue 2624043002: Eliminate loadTimeData dependency from cr_elements/policy (Closed)
Patch Set: Show icons (just not tooltips) if CrPolicyStrings is not defiend Created 3 years, 11 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/policy/cr_policy_network_indicator.js
diff --git a/ui/webui/resources/cr_elements/policy/cr_policy_network_indicator.js b/ui/webui/resources/cr_elements/policy/cr_policy_network_indicator.js
index 38e0d0f182cb6195bb520aad55a846235d70efc1..16dae611e68ae8b8d6cd3af25ddbc4814bd36189 100644
--- a/ui/webui/resources/cr_elements/policy/cr_policy_network_indicator.js
+++ b/ui/webui/resources/cr_elements/policy/cr_policy_network_indicator.js
@@ -75,18 +75,14 @@ Polymer({
* @private
*/
getTooltip_: function() {
- if (this.indicatorType == CrPolicyIndicatorType.NONE)
- return '';
- if (this.indicatorType == CrPolicyIndicatorType.RECOMMENDED) {
- if (!this.property)
- return '';
+ var matches;
+ if (this.indicatorType == CrPolicyIndicatorType.RECOMMENDED &&
+ this.property) {
var value = this.property.Active;
if (value == undefined && this.property.Effective)
value = this.property[this.property.Effective];
- if (value == this.recommended_)
- return this.i18n_('controlledSettingRecommendedMatches');
- return this.i18n_('controlledSettingRecommendedDiffers');
+ matches = value == this.recommended_;
}
- return this.getPolicyIndicatorTooltip(this.indicatorType, '');
+ return this.getPolicyIndicatorTooltip(this.indicatorType, '', matches);
}
});

Powered by Google App Engine
This is Rietveld 408576698