Commit 6eb7d1c3 authored by Lowell Manners's avatar Lowell Manners Committed by Commit Bot

[bfcache] Add TODOs for all unset DidCommitProvisionalLoad_Params fields

We don't currently set all values of DidCommitProvisionalLoad_Params for
BackForwardCache navigations.

This CL adds individual TODOs for each missing parameter, and expliclty
sets to false some parameters which were unset before.


Bug: 1005718
Change-Id: I43cb4f7395c768386f51493f98fc71ce9c473825
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1813498
Commit-Queue: Lowell Manners <lowell@chromium.org>
Reviewed-by: default avatarArthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#698001}
parent eac76719
......@@ -3325,39 +3325,39 @@ const net::HttpResponseHeaders* NavigationRequest::GetResponseHeaders() {
std::unique_ptr<FrameHostMsg_DidCommitProvisionalLoad_Params>
NavigationRequest::MakeDidCommitProvisionalLoadParamsForBFCache() {
// TODO(lowell): Review all of these parameters for completeness.
std::unique_ptr<FrameHostMsg_DidCommitProvisionalLoad_Params> params =
std::make_unique<FrameHostMsg_DidCommitProvisionalLoad_Params>();
params->http_status_code = net::HTTP_OK;
params->method = common_params().method;
params->url_is_unreachable = false;
params->intended_as_new_entry = commit_params().intended_as_new_entry;
params->should_replace_current_entry =
common_params().should_replace_current_entry;
params->post_id = -1;
params->nav_entry_id = commit_params().nav_entry_id;
params->navigation_token = commit_params().navigation_token;
params->transition = common_params().transition;
// TODO(lowell): Is there a way to get access to the the values needed to set
// the insecure_request_policy, etc?
params->did_create_new_entry = false;
// TODO(crbug.com/1005718): Is origin ever unset?
if (commit_params().origin_to_commit.has_value()) {
params->origin = commit_params().origin_to_commit.value();
}
// TODO(crbug.com/1005718): Set insecure_request_policy.
// TODO(crbug.com/1005718): Set insecure_navigations_set.
// TODO(crbug.com/1005718): Set has_potentially_trustworthy_unique_origin.
params->url = common_params().url;
params->should_update_history = true;
params->gesture = common_params().has_user_gesture ? NavigationGestureUser
: NavigationGestureAuto;
params->page_state = commit_params().page_state;
params->should_update_history = true;
if (commit_params().origin_to_commit.has_value()) {
params->origin = commit_params().origin_to_commit.value();
}
params->method = common_params().method;
params->item_sequence_number = frame_entry_item_sequence_number_;
params->document_sequence_number = frame_entry_document_sequence_number_;
// TODO(lowell): Set the actual response mime type from FrameNavigationEntry.
// TODO(crbug.com/1005718): Set the actual mime type.
params->contents_mime_type = "text/html";
params->transition = common_params().transition;
// TODO(crbug.com/1005718): Set is_overriding_user_agent.
// TODO(crbug.com/1005718): Set original_request_url.
params->history_list_was_cleared = false;
params->request_id = GetGlobalRequestID().request_id;
return params;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment