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

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

Issue 1957783002: Replicate Content-Security-Policy into remote frame proxies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed CR feedback from dcheng@. Created 4 years, 7 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/macros.h" 10 #include "base/macros.h"
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 // |unique_name| shouldn't change unless |name| changes. 238 // |unique_name| shouldn't change unless |name| changes.
239 DCHECK_EQ(unique_name, replication_state_.unique_name); 239 DCHECK_EQ(unique_name, replication_state_.unique_name);
240 return; 240 return;
241 } 241 }
242 RecordUniqueNameLength(unique_name.size()); 242 RecordUniqueNameLength(unique_name.size());
243 render_manager_.OnDidUpdateName(name, unique_name); 243 render_manager_.OnDidUpdateName(name, unique_name);
244 replication_state_.name = name; 244 replication_state_.name = name;
245 replication_state_.unique_name = unique_name; 245 replication_state_.unique_name = unique_name;
246 } 246 }
247 247
248 void FrameTreeNode::AddContentSecurityPolicy(
249 const ContentSecurityPolicyHeader& header) {
250 replication_state_.accumulated_csp_headers.push_back(header);
251 render_manager_.OnDidAddContentSecurityPolicy(header);
252 }
253
254 void FrameTreeNode::ResetContentSecurityPolicy() {
255 replication_state_.accumulated_csp_headers.clear();
256 render_manager_.OnDidResetContentSecurityPolicy();
257 }
258
248 void FrameTreeNode::SetEnforceStrictMixedContentChecking(bool should_enforce) { 259 void FrameTreeNode::SetEnforceStrictMixedContentChecking(bool should_enforce) {
249 if (should_enforce == 260 if (should_enforce ==
250 replication_state_.should_enforce_strict_mixed_content_checking) { 261 replication_state_.should_enforce_strict_mixed_content_checking) {
251 return; 262 return;
252 } 263 }
253 render_manager_.OnEnforceStrictMixedContentChecking(should_enforce); 264 render_manager_.OnEnforceStrictMixedContentChecking(should_enforce);
254 replication_state_.should_enforce_strict_mixed_content_checking = 265 replication_state_.should_enforce_strict_mixed_content_checking =
255 should_enforce; 266 should_enforce;
256 } 267 }
257 268
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 void FrameTreeNode::TraceSnapshot() const { 499 void FrameTreeNode::TraceSnapshot() const {
489 DCHECK_CURRENTLY_ON(BrowserThread::UI); 500 DCHECK_CURRENTLY_ON(BrowserThread::UI);
490 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID( 501 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(
491 "navigation", "FrameTreeNode", 502 "navigation", "FrameTreeNode",
492 TRACE_ID_WITH_SCOPE("FrameTreeNode", frame_tree_node_id_), 503 TRACE_ID_WITH_SCOPE("FrameTreeNode", frame_tree_node_id_),
493 std::unique_ptr<base::trace_event::ConvertableToTraceFormat>( 504 std::unique_ptr<base::trace_event::ConvertableToTraceFormat>(
494 new TracedFrameTreeNode(*this))); 505 new TracedFrameTreeNode(*this)));
495 } 506 }
496 507
497 } // namespace content 508 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/frame_tree_node.h ('k') | content/browser/frame_host/navigator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698