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

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

Issue 2520223002: Replicate a parsed feature policy representation so it doesn't need to be parsed in the browser pro… (Closed)
Patch Set: Replicate a parsed feature policy representation so it doesn't need to be parsed in the browser pro… Created 4 years 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) { 258 void FrameTreeNode::SetFeaturePolicyHeader(
259 replication_state_.feature_policy_header = header; 259 const ParsedFeaturePolicy& parsed_header) {
260 replication_state_.feature_policy_header = parsed_header;
260 } 261 }
261 262
262 void FrameTreeNode::ResetFeaturePolicy() { 263 void FrameTreeNode::ResetFeaturePolicy() {
263 replication_state_.feature_policy_header.clear(); 264 replication_state_.feature_policy_header.clear();
264 } 265 }
265 266
266 void FrameTreeNode::AddContentSecurityPolicy( 267 void FrameTreeNode::AddContentSecurityPolicy(
267 const ContentSecurityPolicyHeader& header) { 268 const ContentSecurityPolicyHeader& header) {
268 replication_state_.accumulated_csp_headers.push_back(header); 269 replication_state_.accumulated_csp_headers.push_back(header);
269 render_manager_.OnDidAddContentSecurityPolicy(header); 270 render_manager_.OnDidAddContentSecurityPolicy(header);
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 } 521 }
521 return parent_->child_at(i + relative_offset); 522 return parent_->child_at(i + relative_offset);
522 } 523 }
523 } 524 }
524 525
525 NOTREACHED() << "FrameTreeNode not found in its parent's children."; 526 NOTREACHED() << "FrameTreeNode not found in its parent's children.";
526 return nullptr; 527 return nullptr;
527 } 528 }
528 529
529 } // namespace content 530 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/frame_tree_node.h ('k') | content/browser/frame_host/render_frame_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698