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 b4a59ffafaac70e5f6c79b6203cc43f039a8f715..d5faea7d0ef0fe5436a1889b034f1d8feb2b7ebb 100644 |
| --- a/content/browser/frame_host/frame_tree_node.cc |
| +++ b/content/browser/frame_host/frame_tree_node.cc |
| @@ -321,6 +321,13 @@ void FrameTreeNode::SetPendingSandboxFlags( |
| pending_sandbox_flags_ |= parent()->effective_sandbox_flags(); |
| } |
| +void FrameTreeNode::SetPendingContainerPolicy( |
| + const ParsedFeaturePolicyHeader& container_policy) { |
| + pending_container_policy_ = container_policy; |
| + |
| + // Validate that inherited policy matches? |
|
iclelland
2017/04/05 02:19:07
This isn't necessary; the container policy can be
|
| +} |
| + |
| bool FrameTreeNode::IsDescendantOf(FrameTreeNode* other) const { |
| if (!other || !other->child_count()) |
| return false; |
| @@ -364,10 +371,12 @@ 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; |
| + pending_sandbox_flags_ != replication_state_.sandbox_flags || |
| + pending_container_policy_ != replication_state_.container_policy; |
| replication_state_.sandbox_flags = pending_sandbox_flags_; |
| + replication_state_.container_policy = pending_container_policy_; |
| return did_change_flags; |
| } |