Chromium Code Reviews| 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 ffeda9e10c946b8f8c33b43ecf8a99042e65b63f..6bc08339d750805f596ac466168f34b54ce9f02b 100644 |
| --- a/content/browser/frame_host/frame_tree_node.cc |
| +++ b/content/browser/frame_host/frame_tree_node.cc |
| @@ -321,6 +321,11 @@ void FrameTreeNode::SetPendingSandboxFlags( |
| pending_sandbox_flags_ |= parent()->effective_sandbox_flags(); |
| } |
| +void FrameTreeNode::SetPendingContainerPolicy( |
| + const ParsedFeaturePolicyHeader& container_policy) { |
| + pending_container_policy_ = container_policy; |
|
alexmos
2017/04/11 01:17:49
This is expected to only done for subframe nodes,
iclelland
2017/04/11 17:41:43
That's correct; there is no situation where the co
|
| +} |
| + |
| bool FrameTreeNode::IsDescendantOf(FrameTreeNode* other) const { |
| if (!other || !other->child_count()) |
| return false; |
| @@ -364,11 +369,16 @@ bool FrameTreeNode::IsLoading() const { |
| return current_frame_host->is_loading(); |
| } |
| -bool FrameTreeNode::CommitPendingSandboxFlags() { |
| +bool FrameTreeNode::CommitPendingFramePolicy() { |
| bool did_change_flags = |
| pending_sandbox_flags_ != replication_state_.sandbox_flags; |
| - replication_state_.sandbox_flags = pending_sandbox_flags_; |
| - return did_change_flags; |
| + bool did_change_container_policy = |
| + pending_container_policy_ != replication_state_.container_policy; |
| + if (did_change_flags) |
| + replication_state_.sandbox_flags = pending_sandbox_flags_; |
| + if (did_change_container_policy) |
| + replication_state_.container_policy = pending_container_policy_; |
| + return did_change_flags || did_change_container_policy; |
| } |
| void FrameTreeNode::CreatedNavigationRequest( |