OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_RENDERER_CONTENT_SECURITY_POLICY_UTIL_H_ | 5 #ifndef CONTENT_RENDERER_CONTENT_SECURITY_POLICY_UTIL_H_ |
6 #define CONTENT_RENDERER_CONTENT_SECURITY_POLICY_UTIL_H_ | 6 #define CONTENT_RENDERER_CONTENT_SECURITY_POLICY_UTIL_H_ |
7 | 7 |
8 #include "content/common/content_security_policy/content_security_policy.h" | 8 #include "content/common/content_security_policy/content_security_policy.h" |
9 | 9 #include "content/common/content_security_policy/csp_context.h" |
10 namespace blink { | 10 #include "third_party/WebKit/public/platform/WebContentSecurityPolicyStruct.h" |
11 struct WebContentSecurityPolicyPolicy; | |
12 } // namespace blink | |
13 | 11 |
14 namespace content { | 12 namespace content { |
15 | 13 |
16 // Convert a WebContentSecurityPolicy into a ContentSecurityPolicy, these two | 14 // Convert a WebContentSecurityPolicy into a CSPPolicy. These two classes |
17 // classes are the reflection of each other. One in content, the other in blink. | 15 // represent the exact same thing, but one is in content, the other is in blink. |
18 ContentSecurityPolicy BuildContentSecurityPolicy( | 16 ContentSecurityPolicy BuildContentSecurityPolicy( |
19 const blink::WebContentSecurityPolicyPolicy&); | 17 const blink::WebContentSecurityPolicyPolicy&); |
20 | 18 |
| 19 // Convert a CSPViolationParams into a WebContentSecurityPolicyViolation. These |
| 20 // two classes represent the exact same thing, but one is in content, the other |
| 21 // is in blink. |
| 22 blink::WebContentSecurityPolicyViolation BuildWebContentSecurityPolicyViolation( |
| 23 const content::CSPViolationParams& violation_params); |
| 24 |
21 } // namespace content | 25 } // namespace content |
22 | 26 |
23 #endif /* CONTENT_RENDERER_CONTENT_SECURITY_POLICY_UTIL_H_ */ | 27 #endif /* CONTENT_RENDERER_CONTENT_SECURITY_POLICY_UTIL_H_ */ |
OLD | NEW |