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

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: Now using shared scheme collections from url_util.h. 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 30536bd306c76c4da490f9ea142210612c907d0c..9b185c7b2f2d09961e0128c2f519b7422a75ada8 100644
--- a/content/browser/frame_host/navigation_handle_impl.cc
+++ b/content/browser/frame_host/navigation_handle_impl.cc
@@ -16,6 +16,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"
@@ -32,7 +33,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"
@@ -792,6 +792,12 @@ void NavigationHandleImpl::RegisterNavigationThrottles() {
// RegisterThrottleForTesting.
std::vector<std::unique_ptr<NavigationThrottle>> throttles_to_register =
GetDelegate()->CreateThrottlesForNavigation(this);
+
+ std::unique_ptr<NavigationThrottle> mixed_content_throttle =
+ MixedContentNavigationThrottle::CreateThrottleForNavigation(this);
+ if (mixed_content_throttle)
+ throttles_to_register.push_back(std::move(mixed_content_throttle));
+
std::unique_ptr<NavigationThrottle> devtools_throttle =
RenderFrameDevToolsAgentHost::CreateThrottleForNavigation(this);
if (devtools_throttle)

Powered by Google App Engine
This is Rietveld 408576698