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

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

Issue 1914593002: Limit requests for which link headers can install service workers to secure contexts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 6 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 | content/browser/loader/resource_request_info_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a0855984d17f5fd4f65acf0b6e5be3146c1a9b68..83c1ec7d7456e7940c12a8e343c27203787036df 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -1551,7 +1551,7 @@ void ResourceDispatcherHostImpl::BeginRequest(
resource_context,
request_data.resource_type == RESOURCE_TYPE_MAIN_FRAME),
support_async_revalidation ? request_data.headers : std::string(),
- request_data.request_body);
+ request_data.request_body, request_data.initiated_in_secure_context);
// Request takes ownership.
extra_info->AssociateWithRequest(new_request.get());
@@ -1851,7 +1851,8 @@ ResourceRequestInfoImpl* ResourceDispatcherHostImpl::CreateRequestInfo(
true, // is_async
false, // is_using_lofi
std::string(), // original_headers
- nullptr); // body
+ nullptr, // body
+ false); // initiated_in_secure_context
}
void ResourceDispatcherHostImpl::OnRenderFrameDeleted(
@@ -2266,7 +2267,12 @@ void ResourceDispatcherHostImpl::BeginNavigationRequest(
// TODO(ricea): Make the feature work with stale-while-revalidate
// and clean this up.
std::string(), // original_headers
- info.common_params.post_data);
+ info.common_params.post_data,
+ // TODO(mek): Currently initiated_in_secure_context is only used for
+ // 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
// Request takes ownership.
extra_info->AssociateWithRequest(new_request.get());
« no previous file with comments | « no previous file | content/browser/loader/resource_request_info_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698