Index: Source/core/page/ContentSecurityPolicy.h |
diff --git a/Source/core/page/ContentSecurityPolicy.h b/Source/core/page/ContentSecurityPolicy.h |
index 444455fd25b2cbb1fbb1a719558b63113835e701..13f007ffa1d59162f20eb5d37e7c9d44583ffd34 100644 |
--- a/Source/core/page/ContentSecurityPolicy.h |
+++ b/Source/core/page/ContentSecurityPolicy.h |
@@ -27,8 +27,10 @@ |
#define ContentSecurityPolicy_h |
#include "bindings/v8/ScriptState.h" |
+#include "wtf/HashSet.h" |
#include "wtf/PassOwnPtr.h" |
#include "wtf/Vector.h" |
+#include "wtf/text/StringHash.h" |
#include "wtf/text/TextPosition.h" |
#include "wtf/text/WTFString.h" |
@@ -41,6 +43,7 @@ namespace WebCore { |
class ContentSecurityPolicyResponseHeaders; |
class CSPDirectiveList; |
class DOMStringList; |
+class JSONObject; |
class KURL; |
class ScriptExecutionContext; |
class SecurityOrigin; |
@@ -125,7 +128,7 @@ public: |
void reportInvalidReflectedXSS(const String&) const; |
void reportMissingReportURI(const String&) const; |
void reportUnsupportedDirective(const String&) const; |
- void reportViolation(const String& directiveText, const String& effectiveDirective, const String& consoleMessage, const KURL& blockedURL, const Vector<KURL>& reportURIs, const String& header, const String& contextURL = String(), const WTF::OrdinalNumber& contextLine = WTF::OrdinalNumber::beforeFirst(), ScriptState* = 0) const; |
+ void reportViolation(const String& directiveText, const String& effectiveDirective, const String& consoleMessage, const KURL& blockedURL, const Vector<KURL>& reportURIs, const String& header, const String& contextURL = String(), const WTF::OrdinalNumber& contextLine = WTF::OrdinalNumber::beforeFirst(), ScriptState* = 0); |
void reportBlockedScriptExecutionToInspector(const String& directiveText) const; |
@@ -145,9 +148,14 @@ private: |
void logToConsole(const String& message, const String& contextURL = String(), const WTF::OrdinalNumber& contextLine = WTF::OrdinalNumber::beforeFirst(), ScriptState* = 0) const; |
void addPolicyFromHeaderValue(const String&, HeaderType); |
+ bool shouldSendViolationReport(const String&) const; |
+ void didSendViolationReport(const String&); |
+ |
ScriptExecutionContext* m_scriptExecutionContext; |
bool m_overrideInlineStyleAllowed; |
CSPDirectiveListVector m_policies; |
+ |
+ HashSet<unsigned, AlreadyHashed> m_violationReportsSent; |
}; |
} |