Chromium Code Reviews| 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 0b94e78334c8f1b72da5dc3c7b5ab5dde1e96673..cbc368d132f1c069c02e10daac50b7a204b210fe 100644 |
| --- a/chrome/browser/resources/settings/settings_main/settings_main.js |
| +++ b/chrome/browser/resources/settings/settings_main/settings_main.js |
| @@ -20,7 +20,7 @@ Polymer({ |
| /** |
| * The current active route. |
| - * @type {!SettingsRoute} |
| + * @type {!settings.Route} |
| */ |
| currentRoute: { |
| type: Object, |
| @@ -73,11 +73,8 @@ Polymer({ |
| attached: function() { |
| document.addEventListener('toggle-advanced-page', function(e) { |
| this.advancedToggleExpanded_ = e.detail; |
| - this.currentRoute = { |
| - page: this.advancedToggleExpanded_ ? 'advanced' : 'basic', |
| - section: '', |
| - subpage: [], |
| - }; |
| + settings.navigateTo(this.advancedToggleExpanded_ ? |
| + settings.Route.ADVANCED : settings.Route.BASIC); |
| }.bind(this)); |
| doWhenReady( |
| @@ -109,7 +106,6 @@ Polymer({ |
| }, |
| /** |
| - * @param {!SettingsRoute} newRoute |
| * @private |
| */ |
| currentRouteChanged_: function(newRoute) { |
| @@ -131,7 +127,7 @@ Polymer({ |
| } |
| // Wait for the dom-if changes prior to calculating the overflow padding. |
| - this.async(function() { |
| + setTimeout(function() { |
| this.$.overscroll.style.paddingBottom = this.overscrollHeight_() + 'px'; |
| }); |
|
michaelpg
2016/07/27 03:11:35
.bind(this)
|
| }, |
| @@ -190,11 +186,7 @@ Polymer({ |
| * @private |
| */ |
| ensureInDefaultSearchPage_: function() { |
| - if (this.currentRoute.page != 'basic' || |
| - this.currentRoute.section != '' || |
| - this.currentRoute.subpage.length != 0) { |
| - this.currentRoute = {page: 'basic', section: '', subpage: [], url: ''}; |
| - } |
| + settings.navigateTo(settings.Route.BASIC); |
| }, |
| /** |