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

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

Issue 2696903005: Move common cr-policy-indicator behavior into CrPolicyIndicatorBehavior (Closed)
Patch Set: rename hasPolicy Created 3 years, 10 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 16dae611e68ae8b8d6cd3af25ddbc4814bd36189..6d9d7fe2cac30d4fe43bdba56a700fa045aa14c6 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
@@ -20,16 +20,16 @@ Polymer({
property: {type: Object, observer: 'propertyChanged_'},
/**
- * Which indicator type to show (or NONE).
- * @type {!CrPolicyIndicatorType}
- */
- indicatorType: {type: String, value: CrPolicyIndicatorType.NONE},
-
- /**
* Recommended value for non enforced properties.
* @private {!CrOnc.NetworkPropertyType|undefined}
*/
recommended_: Object,
+
+ /** @override */
+ indicatorTooltip: {
+ type: String,
+ computed: 'getNetworkIndicatorTooltip_(indicatorType)',
+ },
},
/**
@@ -74,7 +74,7 @@ Polymer({
* @return {string} The tooltip text for |type|.
* @private
*/
- getTooltip_: function() {
+ getNetworkIndicatorTooltip_: function() {
var matches;
if (this.indicatorType == CrPolicyIndicatorType.RECOMMENDED &&
this.property) {
@@ -83,6 +83,6 @@ Polymer({
value = this.property[this.property.Effective];
matches = value == this.recommended_;
}
- return this.getPolicyIndicatorTooltip(this.indicatorType, '', matches);
+ return this.getIndicatorTooltip(this.indicatorType, '', matches);
}
});

Powered by Google App Engine
This is Rietveld 408576698