Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Unified Diff: content/browser/frame_host/frame_tree_node.cc

Issue 2797813002: Replicate feature policy container policies. (Closed)
Patch Set: Fix ODR violation Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
}

Powered by Google App Engine
This is Rietveld 408576698