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

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: Fixed external handling order change for request start and redirects. Created 4 years, 5 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 2ad781f10afa6d2eedc242ed246f2281834e08a7..930833dba5f3111e29f9c9bd195f5447c62602a6 100644
--- a/content/browser/loader/navigation_resource_throttle.cc
+++ b/content/browser/loader/navigation_resource_throttle.cc
@@ -51,7 +51,8 @@ void CheckWillStartRequestOnUIThread(
const Referrer& sanitized_referrer,
bool has_user_gesture,
ui::PageTransition transition,
- bool is_external_protocol) {
+ bool is_external_protocol,
+ RequestContextType fetch_request_context_type) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
RenderFrameHostImpl* render_frame_host =
RenderFrameHostImpl::FromID(render_process_id, render_frame_host_id);
@@ -69,7 +70,7 @@ void CheckWillStartRequestOnUIThread(
navigation_handle->WillStartRequest(
method, resource_request_body, sanitized_referrer, has_user_gesture,
- transition, is_external_protocol,
+ transition, is_external_protocol, fetch_request_context_type,
base::Bind(&SendCheckResultToIOThread, callback));
}
@@ -138,9 +139,11 @@ void WillProcessResponseOnUIThread(
NavigationResourceThrottle::NavigationResourceThrottle(
net::URLRequest* request,
- ResourceDispatcherHostDelegate* resource_dispatcher_host_delegate)
+ ResourceDispatcherHostDelegate* resource_dispatcher_host_delegate,
+ RequestContextType fetch_request_context_type)
: request_(request),
resource_dispatcher_host_delegate_(resource_dispatcher_host_delegate),
+ fetch_request_context_type_(fetch_request_context_type),
weak_ptr_factory_(this) {}
NavigationResourceThrottle::~NavigationResourceThrottle() {}
@@ -171,7 +174,7 @@ void NavigationResourceThrottle::WillStartRequest(bool* defer) {
request_->url(), Referrer(GURL(request_->referrer()),
info->GetReferrerPolicy())),
info->HasUserGesture(), info->GetPageTransition(),
- is_external_protocol));
+ is_external_protocol, fetch_request_context_type_));
*defer = true;
}

Powered by Google App Engine
This is Rietveld 408576698