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

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

Issue 2156413002: Settings Router Refactor: Migrate to settings.Route.navigateTo calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update for route rename Created 4 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/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 a5a6d10c5c551c74e652076ad17224e1cae42f98..910207b0502a93fd3d6129a97953b048ae906243 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);
if (this.showAdvancedPage_) {
doWhenReady(
function() {
@@ -121,7 +118,7 @@ Polymer({
},
/**
- * @param {!SettingsRoute} newRoute
+ * @param {!settings.Route} newRoute
* @private
*/
currentRouteChanged_: function(newRoute) {
@@ -153,7 +150,7 @@ Polymer({
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);
}
},

Powered by Google App Engine
This is Rietveld 408576698