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

Unified Diff: third_party/WebKit/Source/core/frame/csp/SourceListDirective.h

Issue 2436003002: CSP: Add 'script-sample' to violation reports. (Closed)
Patch Set: Rebase Created 3 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: third_party/WebKit/Source/core/frame/csp/SourceListDirective.h
diff --git a/third_party/WebKit/Source/core/frame/csp/SourceListDirective.h b/third_party/WebKit/Source/core/frame/csp/SourceListDirective.h
index 17aadca820b441a385e5009ae98f9406681159d2..6ef7699d75595c4c0979e9e7aa65e15c415fce1a 100644
--- a/third_party/WebKit/Source/core/frame/csp/SourceListDirective.h
+++ b/third_party/WebKit/Source/core/frame/csp/SourceListDirective.h
@@ -44,6 +44,7 @@ class CORE_EXPORT SourceListDirective final : public CSPDirective {
bool allowNonce(const String& nonce) const;
bool allowHash(const CSPHashValue&) const;
bool allowHashedAttributes() const;
+ bool allowReportSample() const;
bool isNone() const;
bool isHashOrNoncePresent() const;
uint8_t hashAlgorithmsUsed() const;
@@ -100,6 +101,7 @@ class CORE_EXPORT SourceListDirective final : public CSPDirective {
void addSourceUnsafeEval();
void addSourceStrictDynamic();
void addSourceUnsafeHashedAttributes();
+ void addReportSample();
void addSourceNonce(const String& nonce);
void addSourceHash(const ContentSecurityPolicyHashAlgorithm&,
const DigestValue& hash);
@@ -128,6 +130,7 @@ class CORE_EXPORT SourceListDirective final : public CSPDirective {
bool m_allowEval;
bool m_allowDynamic;
bool m_allowHashedAttributes;
+ bool m_reportSample;
HashSet<String> m_nonces;
HashSet<CSPHashValue> m_hashes;
uint8_t m_hashAlgorithmsUsed;

Powered by Google App Engine
This is Rietveld 408576698