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

Unified Diff: content/browser/loader/navigation_resource_throttle.cc

Issue 1424003006: DataReductionProxyNavigationThrottle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@merge-session-throttle
Patch Set: Created 5 years 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
« no previous file with comments | « content/browser/frame_host/navigation_request.cc ('k') | content/public/browser/navigation_handle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « content/browser/frame_host/navigation_request.cc ('k') | content/public/browser/navigation_handle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698