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

Unified Diff: Source/core/frame/csp/ContentSecurityPolicy.h

Issue 901903003: CSP: Adding the 'upgrade-insecure-requests' directive. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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/frame/csp/ContentSecurityPolicy.h
diff --git a/Source/core/frame/csp/ContentSecurityPolicy.h b/Source/core/frame/csp/ContentSecurityPolicy.h
index 86ecfaa59d16ddaeb5b5c97b89aa04db0982371b..0c3e9b472527c1bcc162f56bea6503266c8f4a87 100644
--- a/Source/core/frame/csp/ContentSecurityPolicy.h
+++ b/Source/core/frame/csp/ContentSecurityPolicy.h
@@ -28,6 +28,7 @@
#include "bindings/core/v8/ScriptState.h"
#include "core/dom/ExecutionContext.h"
+#include "core/dom/SecurityContext.h"
#include "core/frame/ConsoleTypes.h"
#include "platform/network/ContentSecurityPolicyParsers.h"
#include "platform/network/HTTPParsers.h"
@@ -92,6 +93,9 @@ public:
// https://w3c.github.io/webappsec/specs/mixedcontent/#strict-mode
static const char BlockAllMixedContent[];
+ // https://w3c.github.io/webappsec/specs/upgrade/
+ static const char UpgradeInsecureContent[];
+
enum ReportingStatus {
SendReport,
SuppressReport
@@ -191,6 +195,7 @@ public:
const KURL url() const;
void enforceSandboxFlags(SandboxFlags);
void enforceStrictMixedContentChecking();
+ void setInsecureContentPolicy(SecurityContext::InsecureContentPolicy);
String evalDisabledErrorMessage() const;
bool urlMatchesSelf(const KURL&) const;
@@ -235,6 +240,7 @@ private:
bool m_enforceStrictMixedContentChecking;
ReferrerPolicy m_referrerPolicy;
String m_disableEvalErrorMessage;
+ SecurityContext::InsecureContentPolicy m_insecureContentPolicy;
OwnPtr<CSPSource> m_selfSource;
String m_selfProtocol;

Powered by Google App Engine
This is Rietveld 408576698