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

Unified Diff: chrome/browser/resources/options/options_page.js

Issue 306993006: Settings: do the same-path check after the main page special-case. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/options/options_page.js
diff --git a/chrome/browser/resources/options/options_page.js b/chrome/browser/resources/options/options_page.js
index e6331230d53733613e9ef408dce42525abb8d358..5a0ee18cc224eefdfed5c3ea05726ed1f0e4e8bc 100644
--- a/chrome/browser/resources/options/options_page.js
+++ b/chrome/browser/resources/options/options_page.js
@@ -236,12 +236,11 @@ cr.define('options', function() {
// The page is already in history (the user may have clicked the same link
// twice). Do nothing.
- if (path == page.name && !OptionsPage.isLoading())
- return;
-
var hash = opt_params && opt_params.ignoreHash ? '' : window.location.hash;
-
var newPath = (page == this.getDefaultPage() ? '' : page.name) + hash;
+ if (path == newPath && !OptionsPage.isLoading())
+ return;
+
var historyFunction = replace ? uber.replaceState : uber.pushState;
historyFunction.call(uber, {pageName: page.name}, newPath);
};

Powered by Google App Engine
This is Rietveld 408576698