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/frame_tree_node.cc

Issue 2483703002: Replicate feature policy headers to remote frames (Closed)
Patch Set: Get replication actually working; add layout tests Created 4 years, 1 month 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/macros.h" 10 #include "base/macros.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 // Unique name of main frames should always stay empty. 248 // Unique name of main frames should always stay empty.
249 DCHECK(unique_name.empty()); 249 DCHECK(unique_name.empty());
250 } 250 }
251 251
252 RecordUniqueNameLength(unique_name.size()); 252 RecordUniqueNameLength(unique_name.size());
253 render_manager_.OnDidUpdateName(name, unique_name); 253 render_manager_.OnDidUpdateName(name, unique_name);
254 replication_state_.name = name; 254 replication_state_.name = name;
255 replication_state_.unique_name = unique_name; 255 replication_state_.unique_name = unique_name;
256 } 256 }
257 257
258 void FrameTreeNode::SetFeaturePolicyHeader(const std::string& header) {
259 replication_state_.feature_policy_header = header;
260 }
261
258 void FrameTreeNode::AddContentSecurityPolicy( 262 void FrameTreeNode::AddContentSecurityPolicy(
259 const ContentSecurityPolicyHeader& header) { 263 const ContentSecurityPolicyHeader& header) {
260 replication_state_.accumulated_csp_headers.push_back(header); 264 replication_state_.accumulated_csp_headers.push_back(header);
261 render_manager_.OnDidAddContentSecurityPolicy(header); 265 render_manager_.OnDidAddContentSecurityPolicy(header);
262 } 266 }
263 267
264 void FrameTreeNode::ResetContentSecurityPolicy() { 268 void FrameTreeNode::ResetContentSecurityPolicy() {
265 replication_state_.accumulated_csp_headers.clear(); 269 replication_state_.accumulated_csp_headers.clear();
266 render_manager_.OnDidResetContentSecurityPolicy(); 270 render_manager_.OnDidResetContentSecurityPolicy();
267 } 271 }
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 } 516 }
513 return parent_->child_at(i + relative_offset); 517 return parent_->child_at(i + relative_offset);
514 } 518 }
515 } 519 }
516 520
517 NOTREACHED() << "FrameTreeNode not found in its parent's children."; 521 NOTREACHED() << "FrameTreeNode not found in its parent's children.";
518 return nullptr; 522 return nullptr;
519 } 523 }
520 524
521 } // namespace content 525 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698