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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 266013002: Remove HistoryController::GetPreviousEntry. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase; remove browser half of quirk. 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
« no previous file with comments | « content/renderer/history_controller.cc ('k') | content/renderer/render_view_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index c8f5973c138046440da9c4804c466ee3776330f9..178e4090d2bd990a97981dd3cdf4440a83970019 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -1885,6 +1885,12 @@ void RenderFrameImpl::didCommitProvisionalLoad(
DocumentState* document_state =
DocumentState::FromDataSource(frame->dataSource());
NavigationState* navigation_state = document_state->navigation_state();
+
+ // When we perform a new navigation, we need to update the last committed
+ // session history entry with state for the page we are leaving. Do this
+ // before updating the HistoryController state.
+ render_view_->UpdateSessionHistory(frame);
+
render_view_->history_controller()->UpdateForCommit(this, item, commit_type,
navigation_state->was_within_same_page());
@@ -1902,10 +1908,6 @@ void RenderFrameImpl::didCommitProvisionalLoad(
bool is_new_navigation = commit_type == blink::WebStandardCommit;
if (is_new_navigation) {
- // When we perform a new navigation, we need to update the last committed
- // session history entry with state for the page we are leaving.
- render_view_->UpdateSessionHistory(frame);
-
// We bump our Page ID to correspond with the new session history entry.
render_view_->page_id_ = render_view_->next_page_id_++;
@@ -1943,7 +1945,6 @@ void RenderFrameImpl::didCommitProvisionalLoad(
navigation_state->pending_page_id() != render_view_->page_id_ &&
!navigation_state->request_committed()) {
// This is a successful session history navigation!
- render_view_->UpdateSessionHistory(frame);
render_view_->page_id_ = navigation_state->pending_page_id();
render_view_->history_list_offset_ =
« no previous file with comments | « content/renderer/history_controller.cc ('k') | content/renderer/render_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698