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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2032653003: Limit foreign fetch to only intercept requests made from secure contexts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: properly initialize new ResourceRequest member 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
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index bc920bb8454fca5e7bccffb50ab68d0fd5609f0a..e8ccd7e53d759892f5d1499da02aef7a47217d40 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4025,6 +4025,9 @@ void RenderFrameImpl::willSendRequest(
extra_data->set_lofi_state(navigation_state->common_params().lofi_state);
else
extra_data->set_lofi_state(is_using_lofi_ ? LOFI_ON : LOFI_OFF);
+ WebString error;
+ extra_data->set_initiated_in_secure_context(
+ frame->document().isSecureContext(error));
request.setExtraData(extra_data);
// TODO(creis): Update prefetching to work with out-of-process iframes.
« no previous file with comments | « content/common/resource_request.h ('k') | third_party/WebKit/LayoutTests/http/tests/serviceworker/foreign-fetch-basics.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698