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

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

Issue 2046733003: Replicate WebInsecureRequestPolicy instead of a bool for strict mixed content checks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@securitycontext
Patch Set: alexmos@ Created 4 years, 6 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 const ContentSecurityPolicyHeader& header) { 243 const ContentSecurityPolicyHeader& header) {
244 replication_state_.accumulated_csp_headers.push_back(header); 244 replication_state_.accumulated_csp_headers.push_back(header);
245 render_manager_.OnDidAddContentSecurityPolicy(header); 245 render_manager_.OnDidAddContentSecurityPolicy(header);
246 } 246 }
247 247
248 void FrameTreeNode::ResetContentSecurityPolicy() { 248 void FrameTreeNode::ResetContentSecurityPolicy() {
249 replication_state_.accumulated_csp_headers.clear(); 249 replication_state_.accumulated_csp_headers.clear();
250 render_manager_.OnDidResetContentSecurityPolicy(); 250 render_manager_.OnDidResetContentSecurityPolicy();
251 } 251 }
252 252
253 void FrameTreeNode::SetEnforceStrictMixedContentChecking(bool should_enforce) { 253 void FrameTreeNode::SetInsecureRequestPolicy(
254 if (should_enforce == 254 blink::WebInsecureRequestPolicy policy) {
255 replication_state_.should_enforce_strict_mixed_content_checking) { 255 if (policy == replication_state_.insecure_request_policy)
256 return; 256 return;
257 } 257 render_manager_.OnEnforceInsecureRequestPolicy(policy);
258 render_manager_.OnEnforceStrictMixedContentChecking(should_enforce); 258 replication_state_.insecure_request_policy = policy;
259 replication_state_.should_enforce_strict_mixed_content_checking =
260 should_enforce;
261 } 259 }
262 260
263 void FrameTreeNode::SetPendingSandboxFlags( 261 void FrameTreeNode::SetPendingSandboxFlags(
264 blink::WebSandboxFlags sandbox_flags) { 262 blink::WebSandboxFlags sandbox_flags) {
265 pending_sandbox_flags_ = sandbox_flags; 263 pending_sandbox_flags_ = sandbox_flags;
266 264
267 // Subframes should always inherit their parent's sandbox flags. 265 // Subframes should always inherit their parent's sandbox flags.
268 if (parent()) 266 if (parent())
269 pending_sandbox_flags_ |= parent()->effective_sandbox_flags(); 267 pending_sandbox_flags_ |= parent()->effective_sandbox_flags();
270 } 268 }
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 } 495 }
498 return parent_->child_at(i + relative_offset); 496 return parent_->child_at(i + relative_offset);
499 } 497 }
500 } 498 }
501 499
502 NOTREACHED() << "FrameTreeNode not found in its parent's children."; 500 NOTREACHED() << "FrameTreeNode not found in its parent's children.";
503 return nullptr; 501 return nullptr;
504 } 502 }
505 503
506 } // namespace content 504 } // 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