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

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

Issue 2224163002: Settings Router Refactor: Replace route.subpage usage with route.path (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 years, 4 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/settings_main/settings_main.js
diff --git a/chrome/browser/resources/settings/settings_main/settings_main.js b/chrome/browser/resources/settings/settings_main/settings_main.js
index 408b68c55cad19cff860a9e067d7ee0d64d42732..491457067b3a0e16a77c1dab8e7ed5176c532ac2 100644
--- a/chrome/browser/resources/settings/settings_main/settings_main.js
+++ b/chrome/browser/resources/settings/settings_main/settings_main.js
@@ -137,7 +137,7 @@ Polymer({
/** @protected */
currentRouteChanged: function(newRoute) {
- this.inSubpage_ = newRoute.subpage.length > 0;
+ this.inSubpage_ = newRoute.isSubpage();
this.style.height = this.inSubpage_ ? '100%' : '';
if (settings.Route.ABOUT.contains(newRoute)) {
@@ -176,7 +176,7 @@ Polymer({
*/
overscrollHeight_: function() {
var route = settings.getCurrentRoute();
- if (route.subpage.length != 0 || this.showPages_.about)
+ if (route.isSubpage() || this.showPages_.about)
return 0;
var query = 'settings-section[section="' + route.section + '"]';

Powered by Google App Engine
This is Rietveld 408576698