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

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

Issue 2372563002: Adding Embedding-CSP HTTP header (Closed)
Patch Set: Adding a test in FrameFetchContextModifyRequestTest 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 088ef5c2aa02dcfc305a0836a4451758cf4fa54c..bffbd86c29fe7896748a8ba670e647c91d008c9f 100644
--- a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
@@ -834,9 +834,10 @@ SecurityOrigin* FrameFetchContext::getSecurityOrigin() const {
return m_document ? m_document->getSecurityOrigin() : nullptr;
}
-void FrameFetchContext::upgradeInsecureRequest(
- ResourceRequest& resourceRequest) {
- frame()->loader().upgradeInsecureRequest(resourceRequest, m_document);
+void FrameFetchContext::modifyRequestForCSP(ResourceRequest& resourceRequest) {
+ // Record the latest requiredCSP value that will be used when sending this request.
+ frame()->loader().recordLatestRequiredCSP();
+ frame()->loader().modifyRequestForCSP(resourceRequest, m_document);
}
void FrameFetchContext::addClientHintsIfNecessary(FetchRequest& fetchRequest) {

Powered by Google App Engine
This is Rietveld 408576698