| 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/macros.h" | 10 #include "base/macros.h" |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 void FrameTreeNode::SetFeaturePolicyHeader( | 258 void FrameTreeNode::SetFeaturePolicyHeader( |
| 259 const ParsedFeaturePolicy& parsed_header) { | 259 const ParsedFeaturePolicy& parsed_header) { |
| 260 replication_state_.feature_policy_header = parsed_header; | 260 replication_state_.feature_policy_header = parsed_header; |
| 261 } | 261 } |
| 262 | 262 |
| 263 void FrameTreeNode::ResetFeaturePolicy() { | 263 void FrameTreeNode::ResetFeaturePolicy() { |
| 264 replication_state_.feature_policy_header.clear(); | 264 replication_state_.feature_policy_header.clear(); |
| 265 } | 265 } |
| 266 | 266 |
| 267 void FrameTreeNode::AddContentSecurityPolicy( | 267 void FrameTreeNode::AddContentSecurityPolicy( |
| 268 const ContentSecurityPolicyHeader& header) { | 268 const ContentSecurityPolicyHeader& header, |
| 269 const CSPPolicy& policy) { |
| 270 csp_policies.push_back(policy); |
| 269 replication_state_.accumulated_csp_headers.push_back(header); | 271 replication_state_.accumulated_csp_headers.push_back(header); |
| 270 render_manager_.OnDidAddContentSecurityPolicy(header); | 272 render_manager_.OnDidAddContentSecurityPolicy(header); |
| 271 } | 273 } |
| 272 | 274 |
| 273 void FrameTreeNode::ResetContentSecurityPolicy() { | 275 void FrameTreeNode::ResetContentSecurityPolicy() { |
| 274 replication_state_.accumulated_csp_headers.clear(); | 276 replication_state_.accumulated_csp_headers.clear(); |
| 275 render_manager_.OnDidResetContentSecurityPolicy(); | 277 render_manager_.OnDidResetContentSecurityPolicy(); |
| 278 csp_policies.clear(); |
| 276 } | 279 } |
| 277 | 280 |
| 278 void FrameTreeNode::SetInsecureRequestPolicy( | 281 void FrameTreeNode::SetInsecureRequestPolicy( |
| 279 blink::WebInsecureRequestPolicy policy) { | 282 blink::WebInsecureRequestPolicy policy) { |
| 280 if (policy == replication_state_.insecure_request_policy) | 283 if (policy == replication_state_.insecure_request_policy) |
| 281 return; | 284 return; |
| 282 render_manager_.OnEnforceInsecureRequestPolicy(policy); | 285 render_manager_.OnEnforceInsecureRequestPolicy(policy); |
| 283 replication_state_.insecure_request_policy = policy; | 286 replication_state_.insecure_request_policy = policy; |
| 284 } | 287 } |
| 285 | 288 |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 } | 524 } |
| 522 return parent_->child_at(i + relative_offset); | 525 return parent_->child_at(i + relative_offset); |
| 523 } | 526 } |
| 524 } | 527 } |
| 525 | 528 |
| 526 NOTREACHED() << "FrameTreeNode not found in its parent's children."; | 529 NOTREACHED() << "FrameTreeNode not found in its parent's children."; |
| 527 return nullptr; | 530 return nullptr; |
| 528 } | 531 } |
| 529 | 532 |
| 530 } // namespace content | 533 } // namespace content |
| OLD | NEW |