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 b23930bcc55a02cca9df6a3e898753257a2916a0..30e6199f87c1b346f3b05de782a7aa0b78b4058e 100644 |
--- a/chrome/browser/resources/settings/settings_main/settings_main.js |
+++ b/chrome/browser/resources/settings/settings_main/settings_main.js |
@@ -26,7 +26,7 @@ Polymer({ |
/** |
* The current active route. |
- * @type {!SettingsRoute} |
+ * @type {!settings.Route} |
*/ |
currentRoute: { |
type: Object, |
@@ -84,11 +84,8 @@ Polymer({ |
document.addEventListener('toggle-advanced-page', function(e) { |
this.showAdvancedPage_ = e.detail; |
this.isAdvancedMenuOpen_ = e.detail; |
- this.currentRoute = { |
- page: this.isAdvancedMenuOpen_ ? 'advanced' : 'basic', |
- section: '', |
- subpage: [], |
- }; |
+ settings.navigateTo(this.isAdvancedMenuOpen_ ? |
+ settings.Route.ADVANCED : settings.Route.BASIC); |
}.bind(this)); |
doWhenReady( |
@@ -111,7 +108,7 @@ Polymer({ |
}, |
/** |
- * @param {!SettingsRoute} newRoute |
+ * @param {!settings.Route} newRoute |
* @private |
*/ |
currentRouteChanged_: function(newRoute) { |
@@ -140,11 +137,8 @@ Polymer({ |
* @private |
*/ |
ensureInDefaultSearchPage_: function() { |
- if (this.currentRoute.page != 'basic' || |
- this.currentRoute.section != '' || |
- this.currentRoute.subpage.length != 0) { |
- this.currentRoute = {page: 'basic', section: '', subpage: [], url: ''}; |
- } |
+ if (this.currentRoute != settings.Route.BASIC) |
+ settings.navigateTo(settings.Route.BASIC); |
Dan Beam
2016/07/23 00:17:11
nit: maybe considering putting
if (this.current
tommycli
2016/07/25 16:47:20
Done.
|
}, |
/** |