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

Unified Diff: chrome/browser/tab_contents/navigation_controller.cc

Issue 1036003: Add chromium-side support for history.{push,replace}State. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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/tab_contents/navigation_controller.cc
===================================================================
--- chrome/browser/tab_contents/navigation_controller.cc (revision 41846)
+++ chrome/browser/tab_contents/navigation_controller.cc (working copy)
@@ -795,9 +795,10 @@
if (new_entry->update_virtual_url_with_url())
UpdateVirtualURLToURL(new_entry, params.url);
new_entry->set_url(params.url);
- *did_replace_entry = IsRedirect(params) &&
- IsLikelyAutoNavigation(base::TimeTicks::Now());
- InsertOrReplaceEntry(new_entry, *did_replace_entry);
+
+ // This replaces the existing entry since the page ID didn't change.
+ *did_replace_entry = true;
+ InsertOrReplaceEntry(new_entry, true);
}
void NavigationController::RendererDidNavigateNewSubframe(
« no previous file with comments | « chrome/browser/tab_contents/navigation_controller.h ('k') | chrome/browser/tab_contents/navigation_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698