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

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

Issue 2331213002: Add `disposition` to SecurityPolicyViolationEvent (Closed)
Patch Set: Update expected results Created 4 years, 3 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/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 24141d29371db6511ff6eafbe8e10ea13c26bf9b..26d9b17b2827a0de21c7459375815f91e487c3c6 100644
--- a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h
+++ b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h
@@ -135,6 +135,11 @@ public:
Attribute
};
+ enum DispositionType {
Mike West 2016/09/14 13:03:01 We already have `ContentSecurityPolicyHeaderType`,
Sergey Shekyan 2016/09/16 05:36:45 Acknowledged.
+ Enforce,
+ Report
+ };
+
static ContentSecurityPolicy* create()
{
return new ContentSecurityPolicy();
@@ -251,7 +256,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, ViolationType, LocalFrame* = nullptr, RedirectStatus = RedirectStatus::FollowedRedirect, int contextLine = 0);
+ void reportViolation(const String& directiveText, DispositionType, const String& effectiveDirective, const String& consoleMessage, const KURL& blockedURL, const Vector<String>& reportEndpoints, const String& header, ViolationType, LocalFrame* = nullptr, RedirectStatus = RedirectStatus::FollowedRedirect, int contextLine = 0);
Mike West 2016/09/14 13:03:01 Nit: I'd put the disposition next to the Violation
Sergey Shekyan 2016/09/16 05:36:45 Acknowledged.
// Called when mixed content is detected on a page; will trigger a violation report if
// the 'block-all-mixed-content' directive is specified for a policy.

Powered by Google App Engine
This is Rietveld 408576698