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

Unified Diff: content/browser/loader/navigation_resource_throttle.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: Addressed all jam@ latest comments. 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/loader/navigation_resource_throttle.cc
diff --git a/content/browser/loader/navigation_resource_throttle.cc b/content/browser/loader/navigation_resource_throttle.cc
index 5ce1654f7660b3a0cd17866eef12273dee66d62c..a5fcf4778b2fb13a9d57cb5b459416909a865651 100644
--- a/content/browser/loader/navigation_resource_throttle.cc
+++ b/content/browser/loader/navigation_resource_throttle.cc
@@ -29,6 +29,7 @@
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_job_factory.h"
+#include "third_party/WebKit/public/platform/WebMixedContentContextType.h"
#include "ui/base/page_transition_types.h"
namespace content {
@@ -99,7 +100,8 @@ void CheckWillStartRequestOnUIThread(
bool has_user_gesture,
ui::PageTransition transition,
bool is_external_protocol,
- RequestContextType request_context_type) {
+ RequestContextType request_context_type,
+ blink::WebMixedContentContextType mixed_content_context_type) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
NavigationHandleImpl* navigation_handle =
FindNavigationHandle(render_process_id, render_frame_host_id, callback);
@@ -109,6 +111,7 @@ void CheckWillStartRequestOnUIThread(
navigation_handle->WillStartRequest(
method, resource_request_body, sanitized_referrer, has_user_gesture,
transition, is_external_protocol, request_context_type,
+ mixed_content_context_type,
base::Bind(&SendCheckResultToIOThread, callback));
}
@@ -178,10 +181,12 @@ void WillProcessResponseOnUIThread(
NavigationResourceThrottle::NavigationResourceThrottle(
net::URLRequest* request,
ResourceDispatcherHostDelegate* resource_dispatcher_host_delegate,
- RequestContextType request_context_type)
+ RequestContextType request_context_type,
+ blink::WebMixedContentContextType mixed_content_context_type)
: request_(request),
resource_dispatcher_host_delegate_(resource_dispatcher_host_delegate),
request_context_type_(request_context_type),
+ mixed_content_context_type_(mixed_content_context_type),
in_cross_site_transition_(false),
on_transfer_done_result_(NavigationThrottle::DEFER),
weak_ptr_factory_(this) {}
@@ -214,7 +219,8 @@ void NavigationResourceThrottle::WillStartRequest(bool* defer) {
request_->url(), Referrer(GURL(request_->referrer()),
info->GetReferrerPolicy())),
info->HasUserGesture(), info->GetPageTransition(),
- is_external_protocol, request_context_type_));
+ is_external_protocol, request_context_type_,
+ mixed_content_context_type_));
*defer = true;
}

Powered by Google App Engine
This is Rietveld 408576698