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 c00d397faa242edece1dd9bcaee9d085531b57a9..1a7572697106ebfd9824e3081a621a3f48e7c7f0 100644 |
--- a/content/browser/loader/navigation_resource_throttle.cc |
+++ b/content/browser/loader/navigation_resource_throttle.cc |
@@ -11,6 +11,7 @@ |
#include "content/public/browser/resource_controller.h" |
#include "content/public/browser/resource_request_info.h" |
#include "content/public/common/referrer.h" |
+#include "net/base/load_flags.h" |
#include "net/url_request/redirect_info.h" |
#include "net/url_request/url_request.h" |
#include "net/url_request/url_request_context.h" |
@@ -42,7 +43,8 @@ void CheckWillStartRequestOnUIThread(UIChecksPerformedCallback callback, |
const Referrer& sanitized_referrer, |
bool has_user_gesture, |
ui::PageTransition transition, |
- bool is_external_protocol) { |
+ bool is_external_protocol, |
+ bool is_prefetch) { |
DCHECK_CURRENTLY_ON(BrowserThread::UI); |
RenderFrameHostImpl* render_frame_host = |
RenderFrameHostImpl::FromID(render_process_id, render_frame_host_id); |
@@ -62,7 +64,8 @@ void CheckWillStartRequestOnUIThread(UIChecksPerformedCallback callback, |
navigation_handle->WillStartRequest( |
is_post, sanitized_referrer, has_user_gesture, transition, |
- is_external_protocol, base::Bind(&SendCheckResultToIOThread, callback)); |
+ is_external_protocol, is_prefetch, |
+ base::Bind(&SendCheckResultToIOThread, callback)); |
} |
void CheckWillRedirectRequestOnUIThread( |
@@ -144,13 +147,14 @@ void NavigationResourceThrottle::WillStartRequest(bool* defer) { |
DCHECK(request_->method() == "POST" || request_->method() == "GET"); |
BrowserThread::PostTask( |
BrowserThread::UI, FROM_HERE, |
- base::Bind(&CheckWillStartRequestOnUIThread, callback, render_process_id, |
- render_frame_id, request_->method() == "POST", |
- Referrer::SanitizeForRequest( |
- request_->url(), Referrer(GURL(request_->referrer()), |
- info->GetReferrerPolicy())), |
- info->HasUserGesture(), info->GetPageTransition(), |
- is_external_protocol)); |
+ base::Bind( |
+ &CheckWillStartRequestOnUIThread, callback, render_process_id, |
+ render_frame_id, request_->method() == "POST", |
+ Referrer::SanitizeForRequest( |
+ request_->url(), |
+ Referrer(GURL(request_->referrer()), info->GetReferrerPolicy())), |
+ info->HasUserGesture(), info->GetPageTransition(), |
+ is_external_protocol, request_->load_flags() & net::LOAD_PREFETCH)); |
*defer = true; |
} |