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

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

Issue 2200013002: Settings Router Refactor: Improve chrome://md-settings/foobar behavior. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | 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 dc4f177aafd754a0af8b714d77e5cc4f30e603de..ba6e474be4a9565abb1f47932b610dd8fdd347f7 100644
--- a/chrome/browser/resources/settings/route.js
+++ b/chrome/browser/resources/settings/route.js
@@ -297,6 +297,7 @@ cr.define('settings', function() {
* @private {!settings.Route}
*/
var currentRoute_ = getRouteForPath(window.location.pathname) || Route.BASIC;
+ window.history.replaceState(undefined, '', currentRoute_.path);
Dan Beam 2016/08/01 23:39:19 can we do this only if currentRoute_ is null?
tommycli 2016/08/02 00:00:39 Done.
/**
* Helper function to set the current route and notify all observers.
@@ -320,7 +321,7 @@ cr.define('settings', function() {
if (assert(route) == currentRoute_)
return;
- window.history.pushState(undefined, document.title, route.path);
+ window.history.pushState(undefined, '', route.path);
tommycli 2016/08/01 23:38:18 It's unused (by both Firefox and Chrome), and MDN
Dan Beam 2016/08/01 23:39:19 Acknowledged.
setCurrentRoute(route);
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698