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

Unified Diff: third_party/WebKit/Source/core/loader/FrameFetchContext.cpp

Issue 2053693002: WIP: Move 'Upgrade-Insecure-Requests' to the browser process. Base URL: https://chromium.googlesource.com/chromium/src.git@replicate
Patch Set: Not sure I like this. Created 4 years 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: third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
index 54838d534a03af615adc944e7fb6c12f5d7cc371..684420e780f82ee13bec4781c60edb29c5e06f2f 100644
--- a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
@@ -867,6 +867,13 @@ void FrameFetchContext::modifyRequestForCSP(ResourceRequest& resourceRequest) {
frame()->loader().modifyRequestForCSP(resourceRequest, m_document);
}
+WebInsecureRequestPolicy FrameFetchContext::getInsecureRequestPolicy() const {
+ // If no document is present (during frame navigation, for instance), use the
+ // FrameLoader's policy.
+ return m_document ? m_document->getInsecureRequestPolicy()
+ : frame()->loader().getInsecureRequestPolicy();
+}
+
void FrameFetchContext::addClientHintsIfNecessary(FetchRequest& fetchRequest) {
if (!RuntimeEnabledFeatures::clientHintsEnabled() || !m_document)
return;

Powered by Google App Engine
This is Rietveld 408576698