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

Unified Diff: Source/core/dom/Document.cpp

Issue 901903003: CSP: Adding the 'upgrade-insecure-requests' directive. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: unittest Created 5 years, 10 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: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 8e3a75aaac353ec29d77bf72ed342f51b431477b..aeece3e2c8d6e954f5f2e9214a6aadbaabeef443 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -4706,6 +4706,7 @@ void Document::initSecurityContext(const DocumentInit& initializer)
enforceSandboxFlags(initializer.sandboxFlags());
if (initializer.shouldEnforceStrictMixedContentChecking())
enforceStrictMixedContentChecking();
+ setInsecureContentPolicy(initializer.insecureContentPolicy());
setSecurityOrigin(isSandboxed(SandboxOrigin) ? SecurityOrigin::createUnique() : SecurityOrigin::create(m_url));
if (importsController()) {

Powered by Google App Engine
This is Rietveld 408576698