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

Unified Diff: content/child/web_url_request_util.cc

Issue 2262183002: [NoStatePrefetch] Do not send responses to renderer in prefetch mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefetchProto
Patch Set: remove WebDocument api Created 4 years, 3 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
« no previous file with comments | « content/child/resource_dispatcher.cc ('k') | content/common/resource_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/web_url_request_util.cc
diff --git a/content/child/web_url_request_util.cc b/content/child/web_url_request_util.cc
index 267a9575475fcf68c0ac86a7ed3f5674cf8347b6..51830c388fc82894eaf085e36dc777c19276fb24 100644
--- a/content/child/web_url_request_util.cc
+++ b/content/child/web_url_request_util.cc
@@ -11,6 +11,7 @@
#include "base/logging.h"
#include "base/strings/string_util.h"
+#include "content/child/request_extra_data.h"
#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
#include "third_party/WebKit/public/platform/FilePathConversion.h"
@@ -217,6 +218,13 @@ int GetLoadFlagsForWebURLRequest(const blink::WebURLRequest& request) {
if (!request.allowStoredCredentials())
load_flags |= net::LOAD_DO_NOT_SEND_AUTH_DATA;
+ if (request.getExtraData()) {
+ RequestExtraData* extra_data =
+ static_cast<RequestExtraData*>(request.getExtraData());
+ if (extra_data->is_prefetch())
+ load_flags |= net::LOAD_PREFETCH;
+ }
+
return load_flags;
}
« no previous file with comments | « content/child/resource_dispatcher.cc ('k') | content/common/resource_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698