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

Side by Side Diff: content/renderer/content_security_policy_util.cc

Issue 2761153003: PlzNavigate & CSP. Use the SourceLocation in violation reports. (Closed)
Patch Set: Addressed comment @alexmos Created 3 years, 8 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 unified diff | Download patch
OLDNEW
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 #include "content/renderer/content_security_policy_util.h" 5 #include "content/renderer/content_security_policy_util.h"
6 6
7 namespace content { 7 namespace content {
8 8
9 CSPSource BuildCSPSource( 9 CSPSource BuildCSPSource(
10 const blink::WebContentSecurityPolicySourceExpression& source) { 10 const blink::WebContentSecurityPolicySourceExpression& source) {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 violation.blockedUrl = violation_params.blocked_url; 63 violation.blockedUrl = violation_params.blocked_url;
64 violation.reportEndpoints = blink::WebVector<blink::WebString>( 64 violation.reportEndpoints = blink::WebVector<blink::WebString>(
65 violation_params.report_endpoints.size()); 65 violation_params.report_endpoints.size());
66 for (size_t i = 0; i < violation_params.report_endpoints.size(); ++i) { 66 for (size_t i = 0; i < violation_params.report_endpoints.size(); ++i) {
67 violation.reportEndpoints[i] = 67 violation.reportEndpoints[i] =
68 blink::WebString::fromASCII(violation_params.report_endpoints[i]); 68 blink::WebString::fromASCII(violation_params.report_endpoints[i]);
69 } 69 }
70 violation.header = blink::WebString::fromASCII(violation_params.header); 70 violation.header = blink::WebString::fromASCII(violation_params.header);
71 violation.disposition = violation_params.disposition; 71 violation.disposition = violation_params.disposition;
72 violation.afterRedirect = violation_params.after_redirect; 72 violation.afterRedirect = violation_params.after_redirect;
73 violation.sourceLocation.url =
74 blink::WebString::fromLatin1(violation_params.source_location.url);
75 violation.sourceLocation.lineNumber =
76 violation_params.source_location.line_number;
77 violation.sourceLocation.columnNumber =
78 violation_params.source_location.column_number;
73 return violation; 79 return violation;
74 } 80 }
75 81
76 } // namespace content 82 } // namespace content
OLDNEW
« no previous file with comments | « content/common/frame_messages.h ('k') | third_party/WebKit/LayoutTests/FlagExpectations/enable-browser-side-navigation » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698