OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/browser/frame_host/frame_tree_node.h" | 5 #include "content/browser/frame_host/frame_tree_node.h" |
6 | 6 |
7 #include <queue> | 7 #include <queue> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 | 284 |
285 void FrameTreeNode::SetFeaturePolicyHeader( | 285 void FrameTreeNode::SetFeaturePolicyHeader( |
286 const ParsedFeaturePolicyHeader& parsed_header) { | 286 const ParsedFeaturePolicyHeader& parsed_header) { |
287 replication_state_.feature_policy_header = parsed_header; | 287 replication_state_.feature_policy_header = parsed_header; |
288 } | 288 } |
289 | 289 |
290 void FrameTreeNode::ResetFeaturePolicyHeader() { | 290 void FrameTreeNode::ResetFeaturePolicyHeader() { |
291 replication_state_.feature_policy_header.clear(); | 291 replication_state_.feature_policy_header.clear(); |
292 } | 292 } |
293 | 293 |
294 void FrameTreeNode::AddContentSecurityPolicy( | 294 void FrameTreeNode::AddContentSecurityPolicies( |
295 const ContentSecurityPolicyHeader& header) { | 295 const std::vector<ContentSecurityPolicyHeader>& headers) { |
296 replication_state_.accumulated_csp_headers.push_back(header); | 296 replication_state_.accumulated_csp_headers.insert( |
297 render_manager_.OnDidAddContentSecurityPolicy(header); | 297 replication_state_.accumulated_csp_headers.end(), headers.begin(), |
| 298 headers.end()); |
| 299 render_manager_.OnDidAddContentSecurityPolicies(headers); |
298 } | 300 } |
299 | 301 |
300 void FrameTreeNode::ResetCspHeaders() { | 302 void FrameTreeNode::ResetCspHeaders() { |
301 replication_state_.accumulated_csp_headers.clear(); | 303 replication_state_.accumulated_csp_headers.clear(); |
302 render_manager_.OnDidResetContentSecurityPolicy(); | 304 render_manager_.OnDidResetContentSecurityPolicy(); |
303 } | 305 } |
304 | 306 |
305 void FrameTreeNode::SetInsecureRequestPolicy( | 307 void FrameTreeNode::SetInsecureRequestPolicy( |
306 blink::WebInsecureRequestPolicy policy) { | 308 blink::WebInsecureRequestPolicy policy) { |
307 if (policy == replication_state_.insecure_request_policy) | 309 if (policy == replication_state_.insecure_request_policy) |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
571 } | 573 } |
572 return parent_->child_at(i + relative_offset); | 574 return parent_->child_at(i + relative_offset); |
573 } | 575 } |
574 } | 576 } |
575 | 577 |
576 NOTREACHED() << "FrameTreeNode not found in its parent's children."; | 578 NOTREACHED() << "FrameTreeNode not found in its parent's children."; |
577 return nullptr; | 579 return nullptr; |
578 } | 580 } |
579 | 581 |
580 } // namespace content | 582 } // namespace content |
OLD | NEW |