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

Unified Diff: content/child/web_url_loader_impl.cc

Issue 1987413002: Add link preload as=document support Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: crash fix 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 | « no previous file | content/child/web_url_request_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/web_url_loader_impl.cc
diff --git a/content/child/web_url_loader_impl.cc b/content/child/web_url_loader_impl.cc
index 17da0e103519d484dec9df5c4376e17e589aa2f0..ce456205e30a3e54f4f61af9cea63efe592f3870 100644
--- a/content/child/web_url_loader_impl.cc
+++ b/content/child/web_url_loader_impl.cc
@@ -42,6 +42,7 @@
#include "content/public/common/ssl_status.h"
#include "net/base/data_url.h"
#include "net/base/filename_util.h"
+#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
#include "net/cert/cert_status_flags.h"
#include "net/cert/ct_sct_to_string.h"
@@ -449,7 +450,6 @@ void WebURLLoaderImpl::Context::Start(const WebURLRequest& request,
DCHECK(request_id_ == -1);
request_ = request; // Save the request.
GURL url = request.url();
-
if (CanHandleDataURLRequestLocally()) {
if (sync_load_response) {
// This is a sync load. Do the work now.
@@ -499,6 +499,9 @@ void WebURLLoaderImpl::Context::Start(const WebURLRequest& request,
request_info.load_flags = GetLoadFlagsForWebURLRequest(request);
request_info.enable_load_timing = true;
request_info.enable_upload_progress = request.reportUploadProgress();
+ if (request_.linkPreload())
+ request_info.load_flags |= net::LOAD_PREFETCH;
+
if (request.getRequestContext() ==
WebURLRequest::RequestContextXMLHttpRequest &&
(url.has_username() || url.has_password())) {
« no previous file with comments | « no previous file | content/child/web_url_request_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698