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

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

Issue 2555373006: MD Settings: cr-policy-pref-indicator: Eliminate controllingUser (Closed)
Patch Set: . Created 4 years 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
« no previous file with comments | « ui/webui/resources/cr_elements/policy/cr_policy_pref_indicator.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..a76a4c6e7ca747358d03d8bd69c2bf27823f9181 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
@@ -15,18 +15,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}
+ * @type {!chrome.settingsPrivate.PrefObject|undefined}
*/
- 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).
- */
- controllingUser: {type: String, value: ''},
+ pref: Object,
/**
* Which indicator type to show (or NONE).
@@ -41,17 +32,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 || '');
}
});
« no previous file with comments | « ui/webui/resources/cr_elements/policy/cr_policy_pref_indicator.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698