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

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

Issue 2655663004: Introduce content-side Feature Policy object and maintain in parallel with renderer policy. (Closed)
Patch Set: Simplify FP mirroring logic; move most of it to RFHI Created 3 years, 10 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"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ptr_util.h" 12 #include "base/memory/ptr_util.h"
13 #include "base/metrics/histogram_macros.h" 13 #include "base/metrics/histogram_macros.h"
14 #include "base/profiler/scoped_tracker.h" 14 #include "base/profiler/scoped_tracker.h"
15 #include "base/stl_util.h" 15 #include "base/stl_util.h"
16 #include "content/browser/frame_host/frame_tree.h" 16 #include "content/browser/frame_host/frame_tree.h"
17 #include "content/browser/frame_host/navigation_request.h" 17 #include "content/browser/frame_host/navigation_request.h"
18 #include "content/browser/frame_host/navigator.h" 18 #include "content/browser/frame_host/navigator.h"
19 #include "content/browser/frame_host/render_frame_host_impl.h" 19 #include "content/browser/frame_host/render_frame_host_impl.h"
20 #include "content/browser/renderer_host/render_view_host_impl.h" 20 #include "content/browser/renderer_host/render_view_host_impl.h"
21 #include "content/common/feature_policy/feature_policy.h"
alexmos 2017/02/09 05:59:50 This is no longer needed, right?
iclelland 2017/02/09 17:16:17 It's still used for the definition of ParsedFeatur
21 #include "content/common/frame_messages.h" 22 #include "content/common/frame_messages.h"
22 #include "content/common/site_isolation_policy.h" 23 #include "content/common/site_isolation_policy.h"
23 #include "content/public/browser/browser_thread.h" 24 #include "content/public/browser/browser_thread.h"
24 #include "content/public/common/browser_side_navigation_policy.h" 25 #include "content/public/common/browser_side_navigation_policy.h"
25 #include "third_party/WebKit/public/web/WebSandboxFlags.h" 26 #include "third_party/WebKit/public/web/WebSandboxFlags.h"
26 27
27 namespace content { 28 namespace content {
28 29
29 namespace { 30 namespace {
30 31
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 render_manager_.OnDidUpdateName(name, unique_name); 280 render_manager_.OnDidUpdateName(name, unique_name);
280 replication_state_.name = name; 281 replication_state_.name = name;
281 replication_state_.unique_name = unique_name; 282 replication_state_.unique_name = unique_name;
282 } 283 }
283 284
284 void FrameTreeNode::SetFeaturePolicyHeader( 285 void FrameTreeNode::SetFeaturePolicyHeader(
285 const ParsedFeaturePolicyHeader& parsed_header) { 286 const ParsedFeaturePolicyHeader& parsed_header) {
286 replication_state_.feature_policy_header = parsed_header; 287 replication_state_.feature_policy_header = parsed_header;
287 } 288 }
288 289
289 void FrameTreeNode::ResetFeaturePolicy() { 290 void FrameTreeNode::ResetFeaturePolicyHeader() {
290 replication_state_.feature_policy_header.clear(); 291 replication_state_.feature_policy_header.clear();
291 } 292 }
292 293
293 void FrameTreeNode::AddContentSecurityPolicy( 294 void FrameTreeNode::AddContentSecurityPolicy(
294 const ContentSecurityPolicyHeader& header) { 295 const ContentSecurityPolicyHeader& header) {
295 replication_state_.accumulated_csp_headers.push_back(header); 296 replication_state_.accumulated_csp_headers.push_back(header);
296 render_manager_.OnDidAddContentSecurityPolicy(header); 297 render_manager_.OnDidAddContentSecurityPolicy(header);
297 } 298 }
298 299
299 void FrameTreeNode::ResetContentSecurityPolicy() { 300 void FrameTreeNode::ResetContentSecurityPolicy() {
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 } 553 }
553 return parent_->child_at(i + relative_offset); 554 return parent_->child_at(i + relative_offset);
554 } 555 }
555 } 556 }
556 557
557 NOTREACHED() << "FrameTreeNode not found in its parent's children."; 558 NOTREACHED() << "FrameTreeNode not found in its parent's children.";
558 return nullptr; 559 return nullptr;
559 } 560 }
560 561
561 } // namespace content 562 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698