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

Side by Side Diff: content/browser/frame_host/render_frame_host_manager.cc

Issue 2764993002: CSP: group policies in didAddContentSecurityPolicy. (Closed)
Patch Set: Rebase. Created 3 years, 8 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
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager.h ('k') | content/common/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <string> 10 #include <string>
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after
904 } 904 }
905 905
906 void RenderFrameHostManager::OnDidUpdateName(const std::string& name, 906 void RenderFrameHostManager::OnDidUpdateName(const std::string& name,
907 const std::string& unique_name) { 907 const std::string& unique_name) {
908 for (const auto& pair : proxy_hosts_) { 908 for (const auto& pair : proxy_hosts_) {
909 pair.second->Send(new FrameMsg_DidUpdateName(pair.second->GetRoutingID(), 909 pair.second->Send(new FrameMsg_DidUpdateName(pair.second->GetRoutingID(),
910 name, unique_name)); 910 name, unique_name));
911 } 911 }
912 } 912 }
913 913
914 void RenderFrameHostManager::OnDidAddContentSecurityPolicy( 914 void RenderFrameHostManager::OnDidAddContentSecurityPolicies(
915 const ContentSecurityPolicyHeader& header) { 915 const std::vector<ContentSecurityPolicyHeader>& headers) {
916 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible()) 916 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible())
917 return; 917 return;
918 918
919 for (const auto& pair : proxy_hosts_) { 919 for (const auto& pair : proxy_hosts_) {
920 pair.second->Send(new FrameMsg_AddContentSecurityPolicy( 920 pair.second->Send(new FrameMsg_AddContentSecurityPolicies(
921 pair.second->GetRoutingID(), header)); 921 pair.second->GetRoutingID(), headers));
922 } 922 }
923 } 923 }
924 924
925 void RenderFrameHostManager::OnDidResetContentSecurityPolicy() { 925 void RenderFrameHostManager::OnDidResetContentSecurityPolicy() {
926 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible()) 926 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible())
927 return; 927 return;
928 928
929 for (const auto& pair : proxy_hosts_) { 929 for (const auto& pair : proxy_hosts_) {
930 pair.second->Send( 930 pair.second->Send(
931 new FrameMsg_ResetContentSecurityPolicy(pair.second->GetRoutingID())); 931 new FrameMsg_ResetContentSecurityPolicy(pair.second->GetRoutingID()));
(...skipping 1869 matching lines...) Expand 10 before | Expand all | Expand 10 after
2801 delegate_->IsHidden()) { 2801 delegate_->IsHidden()) {
2802 if (delegate_->IsHidden()) { 2802 if (delegate_->IsHidden()) {
2803 render_frame_host_->GetView()->Hide(); 2803 render_frame_host_->GetView()->Hide();
2804 } else { 2804 } else {
2805 render_frame_host_->GetView()->Show(); 2805 render_frame_host_->GetView()->Show();
2806 } 2806 }
2807 } 2807 }
2808 } 2808 }
2809 2809
2810 } // namespace content 2810 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager.h ('k') | content/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698