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

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

Issue 811773002: Mixed Content: Implement strict mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Tests. Created 6 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
« no previous file with comments | « Source/core/frame/csp/CSPDirectiveList.cpp ('k') | Source/core/frame/csp/ContentSecurityPolicy.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/csp/ContentSecurityPolicy.h
diff --git a/Source/core/frame/csp/ContentSecurityPolicy.h b/Source/core/frame/csp/ContentSecurityPolicy.h
index a910dd4e817f1344c0ff4bba93c2a14ef8c36cea..98b5d3dcd6fd83281d4744db041141edd3de2e1b 100644
--- a/Source/core/frame/csp/ContentSecurityPolicy.h
+++ b/Source/core/frame/csp/ContentSecurityPolicy.h
@@ -62,7 +62,7 @@ typedef WillBePersistentHeapVector<RefPtrWillBeMember<ConsoleMessage> > ConsoleM
class ContentSecurityPolicy : public RefCounted<ContentSecurityPolicy> {
WTF_MAKE_FAST_ALLOCATED;
public:
- // CSP 1.0 Directives
+ // CSP Level 1 Directives
static const char ConnectSrc[];
static const char DefaultSrc[];
static const char FontSrc[];
@@ -88,6 +88,10 @@ public:
// https://w3c.github.io/manifest/#content-security-policy
static const char ManifestSrc[];
+ // Mixed Content Directive
+ // https://w3c.github.io/webappsec/specs/mixedcontent/#strict-mode
+ static const char StrictMixedContentChecking[];
+
enum ReportingStatus {
SendReport,
SuppressReport
@@ -175,6 +179,7 @@ public:
void reportInvalidReferrer(const String&);
void reportReportOnlyInMeta(const String&);
void reportMetaOutsideHead(const String&);
+ void reportValueForEmptyDirective(const String& directiveName, const String& value);
// If a frame is passed in, the report will be sent using it as a context. If no frame is
// passed in, the report will be sent via this object's |m_executionContext| (or dropped
@@ -185,6 +190,7 @@ public:
const KURL url() const;
void enforceSandboxFlags(SandboxFlags);
+ void enforceStrictMixedContentChecking();
String evalDisabledErrorMessage() const;
bool urlMatchesSelf(const KURL&) const;
@@ -226,6 +232,7 @@ private:
// State flags used to configure the environment after parsing a policy.
SandboxFlags m_sandboxMask;
+ bool m_enforceStrictMixedContentChecking;
ReferrerPolicy m_referrerPolicy;
String m_disableEvalErrorMessage;
« no previous file with comments | « Source/core/frame/csp/CSPDirectiveList.cpp ('k') | Source/core/frame/csp/ContentSecurityPolicy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698