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

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

Issue 2234093002: Settings Router Refactor: Update subpage-back button to use history back sometimes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | chrome/browser/resources/settings/settings_page/settings_subpage.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/settings/route.js
diff --git a/chrome/browser/resources/settings/route.js b/chrome/browser/resources/settings/route.js
index 096b3c13c9ecc79ea540eec75d273a1504609128..70bd0ca3e1961a726c3c11ca7222726f775b6a34 100644
--- a/chrome/browser/resources/settings/route.js
+++ b/chrome/browser/resources/settings/route.js
@@ -365,8 +365,10 @@ cr.define('settings', function() {
url += '?' + queryString;
}
+ // History serializes the state, so we don't push the actual route object.
+ var state = { previousRoutePath: currentRoute_.path };
dpapad 2016/08/10 22:04:03 Can we not push the string directly instead of an
tommycli 2016/08/10 22:15:28 Yeah. That would be cleaner. Changed.
setCurrentRoute(route, params);
- window.history.pushState(undefined, '', url);
+ window.history.pushState(state, '', url);
};
window.addEventListener('popstate', function(event) {
« no previous file with comments | « no previous file | chrome/browser/resources/settings/settings_page/settings_subpage.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698