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

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: fix tests 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 676429b994c7533a5426cb7ced6b98673c6cadf0..f0ce3fd64e3d45d1c638d541926907880f168bea 100644
--- a/chrome/browser/resources/settings/settings_main/settings_main.js
+++ b/chrome/browser/resources/settings/settings_main/settings_main.js
@@ -123,7 +123,7 @@ Polymer({
/** @protected */
currentRouteChanged: function(newRoute) {
- this.inSubpage_ = newRoute.subpage.length > 0;
+ this.inSubpage_ = newRoute.isSubpage();
this.style.height = this.inSubpage_ ? '100%' : '';
michaelpg 2016/08/10 18:45:52 inSubpage_ really means whether a subpage contains
tommycli 2016/08/10 18:52:17 Yeah, I'll just suggest that dialogs can never be
if (settings.Route.ABOUT.contains(newRoute)) {
@@ -162,7 +162,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