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

Unified Diff: chrome/browser/resources/settings/basic_page/basic_page.js

Issue 2687643004: MD Settings: CrOS: Add secondary user banner (Closed)
Patch Set: Rebase 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: chrome/browser/resources/settings/basic_page/basic_page.js
diff --git a/chrome/browser/resources/settings/basic_page/basic_page.js b/chrome/browser/resources/settings/basic_page/basic_page.js
index 82e9add52da31876ba558caf8c8a3136501948d6..3b766b65d915ec843884dd427bb90028b3c643b1 100644
--- a/chrome/browser/resources/settings/basic_page/basic_page.js
+++ b/chrome/browser/resources/settings/basic_page/basic_page.js
@@ -53,6 +53,18 @@ Polymer({
},
},
+// <if expr="chromeos">
+ /**
+ * Whether the user is a secondary user. Computed so that it is calculated
+ * correctly after loadTimeData is available.
+ * @private
+ */
+ showSecondaryUserBanner_: {
+ type: Boolean,
+ computed: 'computeShowSecondaryUserBanner_(hasExpandedSection_)',
+ },
+// </if>
+
/** @private {!settings.Route|undefined} */
currentRoute_: Object,
},
@@ -108,6 +120,17 @@ Polymer({
return whenSearchDone;
},
+// <if expr="chromeos">
+ /**
+ * @return {boolean}
+ * @private
+ */
+ computeShowSecondaryUserBanner_: function() {
+ return !this.hasExpandedSection_ &&
+ loadTimeData.getBoolean('isSecondaryUser');
+ },
+// </if>
+
/** @private */
onResetDone_: function() {
this.showResetProfileBanner_ = false;
@@ -171,8 +194,8 @@ Polymer({
* both routing and search state.
* @private
*/
- showAdvancedPage_: function(currentRoute, inSearchMode, hasExpandedSection,
- advancedToggleExpanded) {
+ showAdvancedPage_: function(
+ currentRoute, inSearchMode, hasExpandedSection, advancedToggleExpanded) {
return hasExpandedSection ?
settings.Route.ADVANCED.contains(currentRoute) :
advancedToggleExpanded || inSearchMode;

Powered by Google App Engine
This is Rietveld 408576698