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

Side by Side Diff: content/browser/frame_host/navigator_impl.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/navigator_impl.h" 5 #include "content/browser/frame_host/navigator_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 522
523 // Save the origin of the new page. Do this before calling 523 // Save the origin of the new page. Do this before calling
524 // DidNavigateFrame(), because the origin needs to be included in the SwapOut 524 // DidNavigateFrame(), because the origin needs to be included in the SwapOut
525 // message, which is sent inside DidNavigateFrame(). SwapOut needs the 525 // message, which is sent inside DidNavigateFrame(). SwapOut needs the
526 // origin because it creates a RenderFrameProxy that needs this to initialize 526 // origin because it creates a RenderFrameProxy that needs this to initialize
527 // its security context. This origin will also be sent to RenderFrameProxies 527 // its security context. This origin will also be sent to RenderFrameProxies
528 // created via ViewMsg_New and FrameMsg_NewFrameProxy. 528 // created via ViewMsg_New and FrameMsg_NewFrameProxy.
529 render_frame_host->frame_tree_node()->SetCurrentOrigin( 529 render_frame_host->frame_tree_node()->SetCurrentOrigin(
530 params.origin, params.has_potentially_trustworthy_unique_origin); 530 params.origin, params.has_potentially_trustworthy_unique_origin);
531 531
532 render_frame_host->frame_tree_node()->SetEnforceStrictMixedContentChecking( 532 render_frame_host->frame_tree_node()->SetInsecureRequestPolicy(
533 params.should_enforce_strict_mixed_content_checking); 533 params.insecure_request_policy);
534 534
535 // Navigating to a new location means a new, fresh set of http headers and/or 535 // Navigating to a new location means a new, fresh set of http headers and/or
536 // <meta> elements - we need to reset CSP policy to an empty set. 536 // <meta> elements - we need to reset CSP policy to an empty set.
537 if (!is_navigation_within_page) 537 if (!is_navigation_within_page)
538 render_frame_host->frame_tree_node()->ResetContentSecurityPolicy(); 538 render_frame_host->frame_tree_node()->ResetContentSecurityPolicy();
539 539
540 // When using --site-per-process, we notify the RFHM for all navigations, 540 // When using --site-per-process, we notify the RFHM for all navigations,
541 // not just main frame navigations. 541 // not just main frame navigations.
542 if (oopifs_possible) { 542 if (oopifs_possible) {
543 FrameTreeNode* frame = render_frame_host->frame_tree_node(); 543 FrameTreeNode* frame = render_frame_host->frame_tree_node();
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
1174 if (pending_entry != controller_->GetVisibleEntry() || 1174 if (pending_entry != controller_->GetVisibleEntry() ||
1175 !should_preserve_entry) { 1175 !should_preserve_entry) {
1176 controller_->DiscardPendingEntry(true); 1176 controller_->DiscardPendingEntry(true);
1177 1177
1178 // Also force the UI to refresh. 1178 // Also force the UI to refresh.
1179 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL); 1179 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL);
1180 } 1180 }
1181 } 1181 }
1182 1182
1183 } // namespace content 1183 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/frame_tree_node.cc ('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