Index: third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h |
diff --git a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h |
index 5d0c7bfbefe330c0e72ffccf82066662ef06b67c..d31cabe46522efece74d631668124853444d2408 100644 |
--- a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h |
+++ b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h |
@@ -126,7 +126,11 @@ class CORE_EXPORT ContentSecurityPolicy |
kCheckReportOnly |
}; |
- static ContentSecurityPolicy* Create() { return new ContentSecurityPolicy(); } |
+ static ContentSecurityPolicy* Create( |
+ SecurityViolationReportingPolicy reporting_policy = |
+ SecurityViolationReportingPolicy::kReport) { |
+ return new ContentSecurityPolicy(reporting_policy); |
Mike West
2017/05/29 07:46:21
I don't think you need this, because we only colle
|
+ } |
~ContentSecurityPolicy(); |
DECLARE_TRACE(); |
@@ -432,6 +436,8 @@ class CORE_EXPORT ContentSecurityPolicy |
bool HasHeaderDeliveredPolicy() const { return header_delivered_; } |
+ bool IsValid() const { return is_valid; } |
+ |
private: |
FRIEND_TEST_ALL_PREFIXES(ContentSecurityPolicyTest, NonceInline); |
FRIEND_TEST_ALL_PREFIXES(ContentSecurityPolicyTest, NonceSinglePolicy); |
@@ -443,7 +449,7 @@ class CORE_EXPORT ContentSecurityPolicy |
FRIEND_TEST_ALL_PREFIXES(FrameFetchContextTest, |
PopulateResourceRequestChecksReportOnlyCSP); |
- ContentSecurityPolicy(); |
+ ContentSecurityPolicy(SecurityViolationReportingPolicy); |
void ApplyPolicySideEffectsToExecutionContext(); |
@@ -468,6 +474,7 @@ class CORE_EXPORT ContentSecurityPolicy |
CSPDirectiveListVector policies_; |
ConsoleMessageVector console_messages_; |
bool header_delivered_{false}; |
+ SecurityViolationReportingPolicy reporting_policy_; |
HashSet<unsigned, AlreadyHashed> violation_reports_sent_; |
@@ -485,6 +492,7 @@ class CORE_EXPORT ContentSecurityPolicy |
Member<CSPSource> self_source_; |
String self_protocol_; |
+ bool is_valid; |
}; |
} // namespace blink |