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 e1e749223562f4aad3a84e5403c12e52fbcb0e85..8944f279d17e8b4b1984ec6bc4edc0c899bce6ef 100644 |
--- a/content/browser/frame_host/frame_tree_node.cc |
+++ b/content/browser/frame_host/frame_tree_node.cc |
@@ -258,11 +258,20 @@ void FrameTreeNode::SetFrameName(const std::string& name, |
void FrameTreeNode::SetFeaturePolicyHeader( |
const ParsedFeaturePolicyHeader& parsed_header) { |
+ ResetFeaturePolicy(); |
replication_state_.feature_policy_header = parsed_header; |
+ feature_policy_->SetHeaderPolicy(parsed_header); |
} |
void FrameTreeNode::ResetFeaturePolicy() { |
replication_state_.feature_policy_header.clear(); |
+ if (parent()) { |
+ feature_policy_ = FeaturePolicy::CreateFromParentPolicy( |
+ parent()->feature_policy_.get(), current_origin()); |
+ } else { |
+ feature_policy_ = |
+ FeaturePolicy::CreateFromParentPolicy(nullptr, current_origin()); |
+ } |
raymes
2017/02/01 22:42:20
optional: alternatively:
FeaturePolicy* parent_pol
iclelland
2017/02/03 16:38:29
Done.
|
} |
void FrameTreeNode::AddContentSecurityPolicy( |