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

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: 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_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 2b8794e052f62f6ae570f704ad6d84722e3bf149..36b1c96753930953146801fa6ee18bb316dc297e 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -935,6 +935,27 @@ void RenderFrameHostManager::OnDidUpdateName(const std::string& name,
}
}
+void RenderFrameHostManager::OnDidAddContentSecurityPolicy(
+ const ContentSecurityPolicyHeader& header) {
+ if (!SiteIsolationPolicy::AreCrossProcessFramesPossible())
+ return;
+
+ for (const auto& pair : proxy_hosts_) {
+ pair.second->Send(new FrameMsg_AddContentSecurityPolicy(
+ pair.second->GetRoutingID(), header));
+ }
+}
+
+void RenderFrameHostManager::OnDidResetContentSecurityPolicy() {
+ if (!SiteIsolationPolicy::AreCrossProcessFramesPossible())
+ return;
+
+ for (const auto& pair : proxy_hosts_) {
+ pair.second->Send(
+ new FrameMsg_ResetContentSecurityPolicy(pair.second->GetRoutingID()));
+ }
+}
+
void RenderFrameHostManager::OnEnforceStrictMixedContentChecking(
bool should_enforce) {
if (!SiteIsolationPolicy::AreCrossProcessFramesPossible())
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager.h ('k') | content/browser/site_per_process_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698