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

Unified Diff: content/browser/loader/resource_dispatcher_host_impl.cc

Issue 2445993006: [WIP] Upgrade-insecure-request: upgrade insecurely-redirected requests.
Patch Set: bugfix Created 4 years, 2 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/loader/resource_dispatcher_host_impl.cc
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
index 16be639f7207a921d5403da720bf1ea16cb5d07e..c5349410f14e735a62b97457fc6726c8c57a7502 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -1529,7 +1529,8 @@ void ResourceDispatcherHostImpl::ContinuePendingBeginRequest(
resource_context,
request_data.resource_type == RESOURCE_TYPE_MAIN_FRAME),
support_async_revalidation ? request_data.headers : std::string(),
- request_data.request_body, request_data.initiated_in_secure_context);
+ request_data.request_body, request_data.initiated_in_secure_context,
+ request_data.insecure_request_policy);
// Request takes ownership.
extra_info->AssociateWithRequest(new_request.get());
@@ -1856,7 +1857,9 @@ ResourceRequestInfoImpl* ResourceDispatcherHostImpl::CreateRequestInfo(
false, // is_using_lofi
std::string(), // original_headers
nullptr, // body
- false); // initiated_in_secure_context
+ false, // initiated_in_secure_context
+ blink::kLeaveInsecureRequestsAlone); // insecure_request_policy
+
}
void ResourceDispatcherHostImpl::OnRenderViewHostCreated(int child_id,
@@ -2235,7 +2238,8 @@ void ResourceDispatcherHostImpl::BeginNavigationRequest(
// subresource requests, so it doesn't matter what value it gets here.
// If in the future this changes this should be updated to somehow get a
// meaningful value.
- false); // initiated_in_secure_context
+ false, // initiated_in_secure_context
+ info.insecure_request_policy);
extra_info->set_navigation_ui_data(std::move(navigation_ui_data));
if (service_worker_handle_core) {
« no previous file with comments | « content/browser/loader/navigation_url_loader_unittest.cc ('k') | content/browser/loader/resource_dispatcher_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698