OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 15 matching lines...) Expand all Loading... | |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef WebContentSecurityPolicyStruct_h | 31 #ifndef WebContentSecurityPolicyStruct_h |
32 #define WebContentSecurityPolicyStruct_h | 32 #define WebContentSecurityPolicyStruct_h |
33 | 33 |
34 #include "public/platform/WebContentSecurityPolicy.h" | 34 #include "public/platform/WebContentSecurityPolicy.h" |
35 #include "public/platform/WebString.h" | 35 #include "public/platform/WebString.h" |
36 #include "public/platform/WebURL.h" | |
36 #include "public/platform/WebVector.h" | 37 #include "public/platform/WebVector.h" |
37 | 38 |
38 namespace blink { | 39 namespace blink { |
39 | 40 |
40 struct WebContentSecurityPolicySourceExpression { | 41 struct WebContentSecurityPolicySourceExpression { |
41 WebString scheme; | 42 WebString scheme; |
42 WebString host; | 43 WebString host; |
43 bool isHostWildcard; | 44 bool isHostWildcard; |
44 int port; | 45 int port; |
45 bool isPortWildcard; | 46 bool isPortWildcard; |
(...skipping 11 matching lines...) Expand all Loading... | |
57 WebContentSecurityPolicySourceList sourceList; | 58 WebContentSecurityPolicySourceList sourceList; |
58 }; | 59 }; |
59 | 60 |
60 struct WebContentSecurityPolicyPolicy { | 61 struct WebContentSecurityPolicyPolicy { |
61 WebContentSecurityPolicyType disposition; | 62 WebContentSecurityPolicyType disposition; |
62 WebContentSecurityPolicySource source; | 63 WebContentSecurityPolicySource source; |
63 WebVector<WebContentSecurityPolicyDirective> directives; | 64 WebVector<WebContentSecurityPolicyDirective> directives; |
64 WebVector<WebString> reportEndpoints; | 65 WebVector<WebString> reportEndpoints; |
65 }; | 66 }; |
66 | 67 |
68 struct WebContentSecurityPolicyViolation { | |
69 // The name of the directive that infringe the policy. |directive| might be a | |
70 // directive that serves as a fallback to the |effective_directive|. | |
71 WebString directive; | |
72 | |
73 // The name the effective directive that was checked against. | |
74 WebString effectiveDirective; | |
75 | |
76 // The console message that was displayed to the user. | |
77 WebString consoleMessage; | |
78 | |
79 // The URL that was blocked by the policy. | |
80 WebURL blockedUrl; | |
81 | |
82 // The set of URI where a JSON-formatted report of the violation should be | |
83 // sent. | |
84 WebVector<WebString> reportEndpoints; | |
85 | |
86 // The raw content security policy header that was infringed. | |
87 WebString header; | |
88 | |
89 // Each policy has an associated disposition, which is either "enforce" or | |
90 // "report". | |
91 WebContentSecurityPolicyType disposition; | |
92 | |
93 // Whether or not the violation happens after a redirection. | |
alexmos
2017/02/14 06:57:20
nit: s/redirection/redirect/
arthursonzogni
2017/02/15 09:26:10
Done.
| |
94 bool followedRedirect; | |
95 }; | |
96 | |
67 } // namespace blink | 97 } // namespace blink |
68 | 98 |
69 #endif | 99 #endif |
OLD | NEW |