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

Unified Diff: content/browser/frame_host/navigation_handle_impl.cc

Issue 1905033002: PlzNavigate: Move navigation-level mixed content checks to the browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@console-security-message
Patch Set: Address jam@ comments; many minor code and comment updates. Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/navigation_handle_impl.cc
diff --git a/content/browser/frame_host/navigation_handle_impl.cc b/content/browser/frame_host/navigation_handle_impl.cc
index 8ed60813cfc8592fe75bd843f6931c59c078c1ba..069d04391395b006bb8d91785b583e3a3fdadab0 100644
--- a/content/browser/frame_host/navigation_handle_impl.cc
+++ b/content/browser/frame_host/navigation_handle_impl.cc
@@ -14,6 +14,7 @@
#include "content/browser/frame_host/ancestor_throttle.h"
#include "content/browser/frame_host/debug_urls.h"
#include "content/browser/frame_host/frame_tree_node.h"
+#include "content/browser/frame_host/mixed_content_navigation_throttle.h"
#include "content/browser/frame_host/navigator.h"
#include "content/browser/frame_host/navigator_delegate.h"
#include "content/browser/loader/resource_dispatcher_host_impl.h"
@@ -30,7 +31,6 @@
#include "content/public/common/url_constants.h"
#include "net/base/net_errors.h"
#include "net/url_request/redirect_info.h"
-#include "third_party/WebKit/public/platform/WebMixedContentContextType.h"
#include "url/gurl.h"
#include "url/url_constants.h"
@@ -788,6 +788,10 @@ void NavigationHandleImpl::RegisterNavigationThrottles() {
// GetNavigationThrottles is not assigned to throttles_ directly because it
// would overwrite any throttle previously added with
// RegisterThrottleForTesting.
+ if (IsBrowserSideNavigationEnabled()) {
+ throttles_.insert(throttles_.end(),
+ new MixedContentNavigationThrottle(this));
nasko 2017/01/12 18:32:37 Does the ordering of when we add this matter? Woul
carlosk 2017/01/21 02:54:59 I don't know the answer for this. As this is a se
nasko 2017/01/23 22:32:37 Let's keep it first then, until we hear something
carlosk 2017/02/08 02:59:02 OK, I'm keeping as is but just reaffirming: trybot
nasko 2017/02/10 01:08:20 Acknowledged.
+ }
ScopedVector<NavigationThrottle> throttles_to_register =
GetDelegate()->CreateThrottlesForNavigation(this);
std::unique_ptr<NavigationThrottle> devtools_throttle =

Powered by Google App Engine
This is Rietveld 408576698