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

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

Issue 2372563002: Adding Embedding-CSP HTTP header (Closed)
Patch Set: Separating into two functions 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: 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 fca1a3c1d680394488914e046912c8ce62175107..a5b72499bde47254f0f9a18cf143ca75d64f0d59 100644
--- a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
@@ -698,9 +698,11 @@ SecurityOrigin* FrameFetchContext::getSecurityOrigin() const
return m_document ? m_document->getSecurityOrigin() : nullptr;
}
-void FrameFetchContext::upgradeInsecureRequest(ResourceRequest& resourceRequest)
+void FrameFetchContext::addOutgoingSecurityHeadersAndUpgradeRequest(ResourceRequest& resourceRequest)
{
- frame()->loader().upgradeInsecureRequest(resourceRequest, m_document);
+ // Record the latest requiredCSP value that will be used when sending this request.
+ frame()->loader().recordLatestRequiredCSP();
+ frame()->loader().addOutgoingSecurityHeadersAndUpgradeRequest(resourceRequest, m_document);
}
void FrameFetchContext::addClientHintsIfNecessary(FetchRequest& fetchRequest)

Powered by Google App Engine
This is Rietveld 408576698