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

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

Issue 1957783002: Replicate Content-Security-Policy into remote frame proxies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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_manager.cc
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
index 58c17d54c34798e0e070878e4e572a594f41a3a3..9807b993dff696292d571e358668d5d57d2676f2 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -937,6 +937,21 @@ void RenderFrameHostManager::OnDidUpdateName(const std::string& name,
}
}
+void RenderFrameHostManager::OnDidAddContentSecurityPolicy(
+ const ContentSecurityPolicyHeader& header) {
+ for (const auto& pair : proxy_hosts_) {
alexmos 2016/05/11 19:46:40 Should we return early if AreCrossProcessFramesPos
Łukasz Anforowicz 2016/05/11 23:14:47 Done. I've also added this to RenderFrameImpl::di
alexmos 2016/05/12 22:37:24 The proxy_hosts_ for this node (the node with upda
Łukasz Anforowicz 2016/05/13 17:29:15 Thank you for the explanation - I think I got it n
+ pair.second->Send(new FrameMsg_AddContentSecurityPolicy(
+ pair.second->GetRoutingID(), header));
+ }
+}
+
+void RenderFrameHostManager::OnDidResetContentSecurityPolicy() {
+ for (const auto& pair : proxy_hosts_) {
+ pair.second->Send(
+ new FrameMsg_ResetContentSecurityPolicy(pair.second->GetRoutingID()));
+ }
+}
+
void RenderFrameHostManager::OnEnforceStrictMixedContentChecking(
bool should_enforce) {
if (!SiteIsolationPolicy::AreCrossProcessFramesPossible())

Powered by Google App Engine
This is Rietveld 408576698