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

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

Issue 1957783002: Replicate Content-Security-Policy into remote frame proxies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed CR feedback from dcheng@. Created 4 years, 7 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/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 de78df1b008a679665336147ce250c5ad9bf3a98..1cf7dc376cbebad9d69f557cc8bdfab924b2e03f 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -519,6 +519,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_DidAddContentSecurityPolicy,
+ OnDidAddContentSecurityPolicy)
IPC_MESSAGE_HANDLER(FrameHostMsg_EnforceStrictMixedContentChecking,
OnEnforceStrictMixedContentChecking)
IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateToUniqueOrigin,
@@ -1505,6 +1507,11 @@ void RenderFrameHostImpl::OnDidChangeName(const std::string& name,
delegate_->DidChangeName(this, name);
}
+void RenderFrameHostImpl::OnDidAddContentSecurityPolicy(
+ const ContentSecurityPolicyHeader& header) {
+ frame_tree_node()->AddContentSecurityPolicy(header);
+}
+
void RenderFrameHostImpl::OnEnforceStrictMixedContentChecking() {
frame_tree_node()->SetEnforceStrictMixedContentChecking(true);
}
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/browser/frame_host/render_frame_host_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698