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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/frame_host/render_frame_host_manager.h" 5 #include "content/browser/frame_host/render_frame_host_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <utility> 10 #include <utility>
(...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 // WebView). Don't send the update to proxies in those cases. 930 // WebView). Don't send the update to proxies in those cases.
931 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible()) 931 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible())
932 return; 932 return;
933 933
934 for (const auto& pair : proxy_hosts_) { 934 for (const auto& pair : proxy_hosts_) {
935 pair.second->Send(new FrameMsg_DidUpdateName(pair.second->GetRoutingID(), 935 pair.second->Send(new FrameMsg_DidUpdateName(pair.second->GetRoutingID(),
936 name, unique_name)); 936 name, unique_name));
937 } 937 }
938 } 938 }
939 939
940 void RenderFrameHostManager::OnDidAddContentSecurityPolicy(
941 const ContentSecurityPolicyHeader& header) {
942 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
943 pair.second->Send(new FrameMsg_AddContentSecurityPolicy(
944 pair.second->GetRoutingID(), header));
945 }
946 }
947
948 void RenderFrameHostManager::OnDidResetContentSecurityPolicy() {
949 for (const auto& pair : proxy_hosts_) {
950 pair.second->Send(
951 new FrameMsg_ResetContentSecurityPolicy(pair.second->GetRoutingID()));
952 }
953 }
954
940 void RenderFrameHostManager::OnEnforceStrictMixedContentChecking( 955 void RenderFrameHostManager::OnEnforceStrictMixedContentChecking(
941 bool should_enforce) { 956 bool should_enforce) {
942 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible()) 957 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible())
943 return; 958 return;
944 959
945 for (const auto& pair : proxy_hosts_) { 960 for (const auto& pair : proxy_hosts_) {
946 pair.second->Send(new FrameMsg_EnforceStrictMixedContentChecking( 961 pair.second->Send(new FrameMsg_EnforceStrictMixedContentChecking(
947 pair.second->GetRoutingID(), should_enforce)); 962 pair.second->GetRoutingID(), should_enforce));
948 } 963 }
949 } 964 }
(...skipping 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after
2547 resolved_url)) { 2562 resolved_url)) {
2548 DCHECK(!dest_instance || 2563 DCHECK(!dest_instance ||
2549 dest_instance == render_frame_host_->GetSiteInstance()); 2564 dest_instance == render_frame_host_->GetSiteInstance());
2550 return false; 2565 return false;
2551 } 2566 }
2552 2567
2553 return true; 2568 return true;
2554 } 2569 }
2555 2570
2556 } // namespace content 2571 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698