| Index: content/renderer/render_frame_proxy.cc
|
| diff --git a/content/renderer/render_frame_proxy.cc b/content/renderer/render_frame_proxy.cc
|
| index d25f170c488f5405f9daa2ac366fae829cd8482e..ac93a5d1bc6371081b4f65ad687c543abe150342 100644
|
| --- a/content/renderer/render_frame_proxy.cc
|
| +++ b/content/renderer/render_frame_proxy.cc
|
| @@ -12,7 +12,7 @@
|
| #include "base/lazy_instance.h"
|
| #include "content/child/web_url_request_util.h"
|
| #include "content/child/webmessageportchannel_impl.h"
|
| -#include "content/common/content_security_policy_header.h"
|
| +#include "content/common/content_security_policy_structs.h"
|
| #include "content/common/frame_messages.h"
|
| #include "content/common/frame_owner_properties.h"
|
| #include "content/common/frame_replication_state.h"
|
| @@ -500,4 +500,33 @@ void RenderFrameProxy::frameFocused() {
|
| Send(new FrameHostMsg_FrameFocused(routing_id_));
|
| }
|
|
|
| +void RenderFrameProxy::forwardContentSecurityPolicyViolation(
|
| + const blink::WebString& directive_text,
|
| + const blink::WebString& effective_directive,
|
| + const blink::WebString& console_message,
|
| + const blink::WebURL& blocked_url,
|
| + const blink::WebVector<blink::WebString>& report_endpoints,
|
| + const blink::WebString& header,
|
| + blink::WebContentSecurityPolicyViolationType violation_type,
|
| + bool followed_redirect,
|
| + int context_line) {
|
| + content::ContentSecurityPolicyViolation violation;
|
| + violation.directive_text = directive_text.utf8();
|
| + violation.effective_directive = effective_directive.utf8();
|
| + violation.console_message = console_message.utf8();
|
| + violation.blocked_url = blocked_url;
|
| +
|
| + violation.report_endpoints.reserve(report_endpoints.size());
|
| + for (const blink::WebString& report_endpoint : report_endpoints)
|
| + violation.report_endpoints.push_back(report_endpoint.utf8());
|
| +
|
| + violation.header = header.utf8();
|
| + violation.violation_type = violation_type;
|
| + violation.followed_redirect = followed_redirect;
|
| + violation.context_line = context_line;
|
| +
|
| + Send(new FrameHostMsg_ForwardContentSecurityPolicyViolation(routing_id_,
|
| + violation));
|
| +}
|
| +
|
| } // namespace
|
|
|