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

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

Issue 1486993002: Report "inline" or "eval" for non-fetch CSP violations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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 df15db748397dfd954cae78b00374f1f59d43b9a..d528a263e68d3b33aaca3e6426b1d254b30306f2 100644
--- a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h
+++ b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h
@@ -123,6 +123,12 @@ public:
WillNotThrowException
};
+ enum ViolationType {
+ EvalViolation,
+ FetchViolation,
philipj_slow 2015/12/01 13:11:55 Does FetchViolation correspond to resource null, a
+ InlineViolation
+ };
+
static PassRefPtrWillBeRawPtr<ContentSecurityPolicy> create()
{
return adoptRefWillBeNoop(new ContentSecurityPolicy());
@@ -226,7 +232,7 @@ public:
// 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
// on the floor if no such context is available).
- void reportViolation(const String& directiveText, const String& effectiveDirective, const String& consoleMessage, const KURL& blockedURL, const Vector<String>& reportEndpoints, const String& header, LocalFrame* = nullptr);
+ void reportViolation(const String& directiveText, const String& effectiveDirective, const String& consoleMessage, const KURL& blockedURL, const Vector<String>& reportEndpoints, const String& header, ViolationType = FetchViolation, LocalFrame* = nullptr);
void reportBlockedScriptExecutionToInspector(const String& directiveText) const;

Powered by Google App Engine
This is Rietveld 408576698