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

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

Issue 2655463006: PlzNavigate: Enforce 'frame-src' CSP on the browser. (Closed)
Patch Set: Rebase. Created 3 years, 9 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/frame_tree_node.h" 5 #include "content/browser/frame_host/frame_tree_node.h"
6 6
7 #include <queue> 7 #include <queue>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 void FrameTreeNode::SetFeaturePolicyHeader( 284 void FrameTreeNode::SetFeaturePolicyHeader(
285 const ParsedFeaturePolicyHeader& parsed_header) { 285 const ParsedFeaturePolicyHeader& parsed_header) {
286 replication_state_.feature_policy_header = parsed_header; 286 replication_state_.feature_policy_header = parsed_header;
287 } 287 }
288 288
289 void FrameTreeNode::ResetFeaturePolicyHeader() { 289 void FrameTreeNode::ResetFeaturePolicyHeader() {
290 replication_state_.feature_policy_header.clear(); 290 replication_state_.feature_policy_header.clear();
291 } 291 }
292 292
293 void FrameTreeNode::AddContentSecurityPolicy( 293 void FrameTreeNode::AddContentSecurityPolicy(
294 const ContentSecurityPolicyHeader& header, 294 const ContentSecurityPolicyHeader& header) {
295 const std::vector<ContentSecurityPolicy>& policies) {
296 replication_state_.accumulated_csp_headers.push_back(header); 295 replication_state_.accumulated_csp_headers.push_back(header);
297 render_manager_.OnDidAddContentSecurityPolicy(header); 296 render_manager_.OnDidAddContentSecurityPolicy(header);
298 csp_policies_.insert(csp_policies_.end(), policies.begin(), policies.end());
299 } 297 }
300 298
301 void FrameTreeNode::ResetContentSecurityPolicy() { 299 void FrameTreeNode::ResetCspHeaders() {
302 replication_state_.accumulated_csp_headers.clear(); 300 replication_state_.accumulated_csp_headers.clear();
303 render_manager_.OnDidResetContentSecurityPolicy(); 301 render_manager_.OnDidResetContentSecurityPolicy();
304 csp_policies_.clear();
305 } 302 }
306 303
307 void FrameTreeNode::SetInsecureRequestPolicy( 304 void FrameTreeNode::SetInsecureRequestPolicy(
308 blink::WebInsecureRequestPolicy policy) { 305 blink::WebInsecureRequestPolicy policy) {
309 if (policy == replication_state_.insecure_request_policy) 306 if (policy == replication_state_.insecure_request_policy)
310 return; 307 return;
311 render_manager_.OnEnforceInsecureRequestPolicy(policy); 308 render_manager_.OnEnforceInsecureRequestPolicy(policy);
312 replication_state_.insecure_request_policy = policy; 309 replication_state_.insecure_request_policy = policy;
313 } 310 }
314 311
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 } 558 }
562 return parent_->child_at(i + relative_offset); 559 return parent_->child_at(i + relative_offset);
563 } 560 }
564 } 561 }
565 562
566 NOTREACHED() << "FrameTreeNode not found in its parent's children."; 563 NOTREACHED() << "FrameTreeNode not found in its parent's children.";
567 return nullptr; 564 return nullptr;
568 } 565 }
569 566
570 } // namespace content 567 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/frame_tree_node.h ('k') | content/browser/frame_host/interstitial_page_navigator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698