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

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..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 || '');
}
});
« 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