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

Unified Diff: content/browser/frame_host/frame_tree_node.cc

Issue 2764993002: CSP: group policies in didAddContentSecurityPolicy. (Closed)
Patch Set: Nit. 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/browser/frame_host/frame_tree_node.cc
diff --git a/content/browser/frame_host/frame_tree_node.cc b/content/browser/frame_host/frame_tree_node.cc
index ee394a607ab5e7cadf5abfc96f44a58bddddd9d9..d5ab7854f68f1a6fd199910853a3d6359e821b73 100644
--- a/content/browser/frame_host/frame_tree_node.cc
+++ b/content/browser/frame_host/frame_tree_node.cc
@@ -290,10 +290,12 @@ void FrameTreeNode::ResetFeaturePolicyHeader() {
replication_state_.feature_policy_header.clear();
}
-void FrameTreeNode::AddContentSecurityPolicy(
- const ContentSecurityPolicyHeader& header) {
- replication_state_.accumulated_csp_headers.push_back(header);
- render_manager_.OnDidAddContentSecurityPolicy(header);
+void FrameTreeNode::AddContentSecurityPolicies(
+ const std::vector<ContentSecurityPolicyHeader>& headers) {
+ replication_state_.accumulated_csp_headers.insert(
+ replication_state_.accumulated_csp_headers.end(), headers.begin(),
+ headers.end());
+ render_manager_.OnDidAddContentSecurityPolicies(headers);
}
void FrameTreeNode::ResetCspHeaders() {

Powered by Google App Engine
This is Rietveld 408576698