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

Unified Diff: content/browser/frame_host/navigation_request.cc

Issue 1018383002: Make NavigationParams clearer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase + addressed comment Created 5 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
« no previous file with comments | « content/browser/frame_host/navigation_request.h ('k') | content/browser/frame_host/navigator_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/navigation_request.cc
diff --git a/content/browser/frame_host/navigation_request.cc b/content/browser/frame_host/navigation_request.cc
index 62349d7a5ac29ec0a0eb8ba01e485352eefeac70..e5973ee3284556933bebee93e008f511026f5236 100644
--- a/content/browser/frame_host/navigation_request.cc
+++ b/content/browser/frame_host/navigation_request.cc
@@ -89,9 +89,11 @@ scoped_ptr<NavigationRequest> NavigationRequest::CreateBrowserInitiated(
frame_tree_node, entry.ConstructCommonNavigationParams(navigation_type),
BeginNavigationParams(method, headers.ToString(),
LoadFlagFromNavigationType(navigation_type), false),
- entry.ConstructCommitNavigationParams(navigation_start),
- entry.ConstructHistoryNavigationParams(controller), request_body, true,
- &entry));
+ entry.ConstructRequestNavigationParams(
+ navigation_start, controller->GetIndexOfEntry(&entry),
+ controller->GetLastCommittedEntryIndex(),
+ controller->GetEntryCount()),
+ request_body, true, &entry));
return navigation_request.Pass();
}
@@ -108,11 +110,13 @@ scoped_ptr<NavigationRequest> NavigationRequest::CreateRendererInitiated(
// navigation may start in a renderer and commit in another one.
// TODO(clamy): See if the navigation start time should be measured in the
// renderer and sent to the browser instead of being measured here.
- scoped_ptr<NavigationRequest> navigation_request(new NavigationRequest(
- frame_tree_node, common_params, begin_params, CommitNavigationParams(),
- HistoryNavigationParams(PageState(), -1, -1, current_history_list_offset,
- current_history_list_length, false),
- body, false, nullptr));
+ // TODO(clamy): The pending history list offset should be properly set.
+ RequestNavigationParams request_params;
+ request_params.current_history_list_offset = current_history_list_offset;
+ request_params.current_history_list_length = current_history_list_length;
+ scoped_ptr<NavigationRequest> navigation_request(
+ new NavigationRequest(frame_tree_node, common_params, begin_params,
+ request_params, body, false, nullptr));
return navigation_request.Pass();
}
@@ -120,16 +124,14 @@ NavigationRequest::NavigationRequest(
FrameTreeNode* frame_tree_node,
const CommonNavigationParams& common_params,
const BeginNavigationParams& begin_params,
- const CommitNavigationParams& commit_params,
- const HistoryNavigationParams& history_params,
+ const RequestNavigationParams& request_params,
scoped_refptr<ResourceRequestBody> body,
bool browser_initiated,
const NavigationEntryImpl* entry)
: frame_tree_node_(frame_tree_node),
common_params_(common_params),
begin_params_(begin_params),
- commit_params_(commit_params),
- history_params_(history_params),
+ request_params_(request_params),
browser_initiated_(browser_initiated),
state_(NOT_STARTED),
restore_type_(NavigationEntryImpl::RESTORE_NONE),
« no previous file with comments | « content/browser/frame_host/navigation_request.h ('k') | content/browser/frame_host/navigator_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698