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

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

Issue 2483703002: Replicate feature policy headers to remote frames (Closed)
Patch Set: Get replication actually working; add layout tests Created 4 years, 1 month 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/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 19d576e522a785b5fcfd87a5a12fb30b2fd37900..c33e6311fb079bf8ba934995e71e1a40d5d1ee99 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -673,6 +673,8 @@ bool RenderFrameHostImpl::OnMessageReceived(const IPC::Message &msg) {
OnDidAccessInitialDocument)
IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeOpener, OnDidChangeOpener)
IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeName, OnDidChangeName)
+ IPC_MESSAGE_HANDLER(FrameHostMsg_DidSetFeaturePolicyHeader,
+ OnDidSetFeaturePolicyHeader)
IPC_MESSAGE_HANDLER(FrameHostMsg_DidAddContentSecurityPolicy,
OnDidAddContentSecurityPolicy)
IPC_MESSAGE_HANDLER(FrameHostMsg_EnforceInsecureRequestPolicy,
@@ -1711,6 +1713,11 @@ void RenderFrameHostImpl::OnDidChangeName(const std::string& name,
delegate_->DidChangeName(this, name);
}
+void RenderFrameHostImpl::OnDidSetFeaturePolicyHeader(
+ const std::string& header) {
+ frame_tree_node()->SetFeaturePolicyHeader(header);
+}
+
void RenderFrameHostImpl::OnDidAddContentSecurityPolicy(
const ContentSecurityPolicyHeader& header) {
frame_tree_node()->AddContentSecurityPolicy(header);

Powered by Google App Engine
This is Rietveld 408576698