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

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

Issue 2687643004: MD Settings: CrOS: Add secondary user banner (Closed)
Patch Set: 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..1b465465c54f9b7fdd465ced75ab16cc508372de 100644
--- a/chrome/browser/resources/settings/basic_page/basic_page.js
+++ b/chrome/browser/resources/settings/basic_page/basic_page.js
@@ -53,6 +53,14 @@ Polymer({
},
},
+// <if expr="chromeos">
+ /** @private Whether the user is a secondary user. */
+ showSecondaryUserBanner_: {
+ type: Boolean,
+ computed: 'computeShowSecondaryUserBanner_(hasExpandedSection_)',
+ },
+// </if>
dschuyler 2017/02/11 02:54:56 Can this var be removed and computeShowSecondaryUs
stevenjb 2017/02/13 18:28:00 This needs to be computed after loadTimeData is av
+
/** @private {!settings.Route|undefined} */
currentRoute_: Object,
},
@@ -108,6 +116,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 +190,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