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

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: Addressed most CR feedback from mkwst@, alexmos@ and 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 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 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible())
943 return;
944
945 for (const auto& pair : proxy_hosts_) {
946 pair.second->Send(new FrameMsg_AddContentSecurityPolicy(
947 pair.second->GetRoutingID(), header));
948 }
949 }
950
951 void RenderFrameHostManager::OnDidResetContentSecurityPolicy() {
952 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible())
953 return;
954
955 for (const auto& pair : proxy_hosts_) {
956 pair.second->Send(
957 new FrameMsg_ResetContentSecurityPolicy(pair.second->GetRoutingID()));
958 }
959 }
960
940 void RenderFrameHostManager::OnEnforceStrictMixedContentChecking( 961 void RenderFrameHostManager::OnEnforceStrictMixedContentChecking(
941 bool should_enforce) { 962 bool should_enforce) {
942 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible()) 963 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible())
943 return; 964 return;
944 965
945 for (const auto& pair : proxy_hosts_) { 966 for (const auto& pair : proxy_hosts_) {
946 pair.second->Send(new FrameMsg_EnforceStrictMixedContentChecking( 967 pair.second->Send(new FrameMsg_EnforceStrictMixedContentChecking(
947 pair.second->GetRoutingID(), should_enforce)); 968 pair.second->GetRoutingID(), should_enforce));
948 } 969 }
949 } 970 }
(...skipping 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after
2547 resolved_url)) { 2568 resolved_url)) {
2548 DCHECK(!dest_instance || 2569 DCHECK(!dest_instance ||
2549 dest_instance == render_frame_host_->GetSiteInstance()); 2570 dest_instance == render_frame_host_->GetSiteInstance());
2550 return false; 2571 return false;
2551 } 2572 }
2552 2573
2553 return true; 2574 return true;
2554 } 2575 }
2555 2576
2556 } // namespace content 2577 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698