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

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: 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
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..1737e1395cd9a62360b1084d336500bec1454663 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.ConstructCommitNavigationParams(
+ 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.
+ CommitNavigationParams commit_params;
+ commit_params.current_history_list_offset = current_history_list_offset;
+ commit_params.current_history_list_length = current_history_list_length;
+ scoped_ptr<NavigationRequest> navigation_request(
+ new NavigationRequest(frame_tree_node, common_params, begin_params,
+ commit_params, body, false, nullptr));
return navigation_request.Pass();
}
@@ -121,7 +125,6 @@ NavigationRequest::NavigationRequest(
const CommonNavigationParams& common_params,
const BeginNavigationParams& begin_params,
const CommitNavigationParams& commit_params,
- const HistoryNavigationParams& history_params,
scoped_refptr<ResourceRequestBody> body,
bool browser_initiated,
const NavigationEntryImpl* entry)
@@ -129,7 +132,6 @@ NavigationRequest::NavigationRequest(
common_params_(common_params),
begin_params_(begin_params),
commit_params_(commit_params),
- history_params_(history_params),
browser_initiated_(browser_initiated),
state_(NOT_STARTED),
restore_type_(NavigationEntryImpl::RESTORE_NONE),

Powered by Google App Engine
This is Rietveld 408576698