Chromium Code Reviews| Index: third_party/WebKit/public/platform/WebContentSecurityPolicyStruct.h |
| diff --git a/third_party/WebKit/public/platform/WebContentSecurityPolicyStruct.h b/third_party/WebKit/public/platform/WebContentSecurityPolicyStruct.h |
| index 2e1d0bd5caa30547f65f69e5a1f03b2cf27ddddc..ccd838fd92ba9e82513cf6df39ecac0b4828cdae 100644 |
| --- a/third_party/WebKit/public/platform/WebContentSecurityPolicyStruct.h |
| +++ b/third_party/WebKit/public/platform/WebContentSecurityPolicyStruct.h |
| @@ -33,6 +33,7 @@ |
| #include "public/platform/WebContentSecurityPolicy.h" |
| #include "public/platform/WebString.h" |
| +#include "public/platform/WebURL.h" |
| #include "public/platform/WebVector.h" |
| namespace blink { |
| @@ -70,6 +71,35 @@ struct WebContentSecurityPolicyPolicy { |
| WebString header; |
| }; |
| +struct WebContentSecurityPolicyViolation { |
| + // The name of the directive that infringe the policy. |directive| might be a |
|
alexmos
2017/03/13 17:26:26
nit: s/infringe/violates/
arthursonzogni
2017/03/14 15:38:57
Done.
|
| + // directive that serves as a fallback to the |effective_directive|. |
| + WebString directive; |
| + |
| + // The name the effective directive that was checked against. |
| + WebString effectiveDirective; |
| + |
| + // The console message to be displayed to the user. |
| + WebString consoleMessage; |
| + |
| + // The URL that was blocked by the policy. |
| + WebURL blockedUrl; |
| + |
| + // The set of URI where a JSON-formatted report of the violation should be |
| + // sent. |
| + WebVector<WebString> reportEndpoints; |
|
dcheng
2017/03/13 19:02:54
Can we use WebURL if these are URLs?
arthursonzogni
2017/03/14 15:38:57
I don't know. Blink uses a Vector<String> in CPDir
dcheng
2017/03/16 08:34:46
I talked with mkwst, and he's OK with changing thi
arthursonzogni
2017/03/16 15:47:36
Thank you for clarifying that. I will address it i
|
| + |
| + // The raw content security policy header that was infringed. |
| + WebString header; |
| + |
| + // Each policy has an associated disposition, which is either "enforce" or |
| + // "report". |
| + WebContentSecurityPolicyType disposition; |
| + |
| + // Whether or not the violation happens after a redirect. |
| + bool afterRedirect; |
| +}; |
| + |
| } // namespace blink |
| #endif |