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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 1129913004: Add a check that the planned replacement for page id for updating the history offset works. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@classify
Patch Set: check Created 5 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 | « no previous file | no next file » | 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 b44691dc57a9f4df6a18592fbf89559507476de8..24b9f0b3b150bca507a6b39d65da3d06120b6353 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -2690,13 +2690,20 @@ void RenderFrameImpl::didCommitProvisionalLoad(
render_view_->history_list_offset_ + 1;
}
} else {
- if (navigation_state->request_params().page_id != -1) {
+ const RequestNavigationParams& request_params =
+ navigation_state->request_params();
+ if (request_params.page_id != -1) {
// This is a successful session history navigation!
- render_view_->page_id_ = navigation_state->request_params().page_id;
+ render_view_->page_id_ = request_params.page_id;
render_view_->history_list_offset_ =
- navigation_state->request_params().pending_history_list_offset;
+ request_params.pending_history_list_offset;
}
+ // Page id is going away (http://crbug.com/369661); ensure that a
+ // replacement that doesn't use page id is equivalent in all cases.
+ CHECK_EQ(request_params.page_id != -1,
+ request_params.nav_entry_id != 0 &&
+ !request_params.intended_as_new_entry);
}
bool sent = Send(
« 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