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

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

Issue 2957153003: MD Settings: remove unsupported routes from guest-mode. (Closed)
Patch Set: merge Created 3 years, 5 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 fe8cc8629fefeca5e288ccda49a0e075c5abfaa2..1f386cc6218091f2963d0357ee84a543d012dbb0 100644
--- a/chrome/browser/resources/settings/basic_page/basic_page.js
+++ b/chrome/browser/resources/settings/basic_page/basic_page.js
@@ -115,7 +115,7 @@ Polymer({
currentRouteChanged: function(newRoute, oldRoute) {
this.currentRoute_ = newRoute;
- if (settings.Route.ADVANCED.contains(newRoute))
+ if (settings.routes.ADVANCED && settings.routes.ADVANCED.contains(newRoute))
this.advancedToggleExpanded = true;
if (oldRoute && oldRoute.isSubpage()) {
@@ -258,7 +258,7 @@ Polymer({
* @private
*/
showBasicPage_: function(currentRoute, inSearchMode, hasExpandedSection) {
- return !hasExpandedSection || settings.Route.BASIC.contains(currentRoute);
+ return !hasExpandedSection || settings.routes.BASIC.contains(currentRoute);
},
/**
@@ -272,8 +272,10 @@ Polymer({
*/
showAdvancedPage_: function(
currentRoute, inSearchMode, hasExpandedSection, advancedToggleExpanded) {
- return hasExpandedSection ? settings.Route.ADVANCED.contains(currentRoute) :
- advancedToggleExpanded || inSearchMode;
+ return hasExpandedSection ?
+ (settings.routes.ADVANCED &&
+ settings.routes.ADVANCED.contains(currentRoute)) :
+ advancedToggleExpanded || inSearchMode;
},
/**

Powered by Google App Engine
This is Rietveld 408576698