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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2764993002: CSP: group policies in didAddContentSecurityPolicy. (Closed)
Patch Set: CSP send policies in didAddContentSecurityPolicy one by one. Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index b1dfbf11a00a9b902bc14fb8fdd748b826634f04..37af821b4e964a4e9545eb5f6e10a30c9684eb58 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -3224,18 +3224,14 @@ void RenderFrameImpl::didAddContentSecurityPolicy(
const blink::WebString& header_value,
blink::WebContentSecurityPolicyType type,
blink::WebContentSecurityPolicySource source,
- const std::vector<blink::WebContentSecurityPolicyPolicy>& policies) {
+ const blink::WebContentSecurityPolicyPolicy& policy) {
ContentSecurityPolicyHeader header;
header.header_value = header_value.utf8();
header.type = type;
header.source = source;
- std::vector<ContentSecurityPolicy> content_policies;
- for (const auto& policy : policies)
- content_policies.push_back(BuildContentSecurityPolicy(policy));
-
- Send(new FrameHostMsg_DidAddContentSecurityPolicy(routing_id_, header,
- content_policies));
+ Send(new FrameHostMsg_DidAddContentSecurityPolicy(
+ routing_id_, header, BuildContentSecurityPolicy(policy)));
}
void RenderFrameImpl::didChangeFrameOwnerProperties(

Powered by Google App Engine
This is Rietveld 408576698