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

Unified Diff: chrome/browser/predictors/resource_prefetcher.cc

Issue 891343007: Add LOAD_PREFETCH flag for all requests sent by resource prefetcher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | chrome/browser/predictors/resource_prefetcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/predictors/resource_prefetcher.cc
diff --git a/chrome/browser/predictors/resource_prefetcher.cc b/chrome/browser/predictors/resource_prefetcher.cc
index 702f7fc35e2a2018f28fc7652c40129a26ca62f8..dddfa3373cb3621a48108cae156d3c96e7b0ddc2 100644
--- a/chrome/browser/predictors/resource_prefetcher.cc
+++ b/chrome/browser/predictors/resource_prefetcher.cc
@@ -10,6 +10,7 @@
#include "base/stl_util.h"
#include "content/public/browser/browser_thread.h"
#include "net/base/io_buffer.h"
+#include "net/base/load_flags.h"
#include "net/base/request_priority.h"
#include "net/url_request/url_request_context.h"
@@ -134,6 +135,7 @@ void ResourcePrefetcher::SendRequest(Request* request) {
url_request->set_method("GET");
url_request->set_first_party_for_cookies(navigation_id_.main_frame_url);
url_request->SetReferrer(navigation_id_.main_frame_url.spec());
+ url_request->SetLoadFlags(url_request->load_flags() | net::LOAD_PREFETCH);
StartURLRequest(url_request);
}
« no previous file with comments | « no previous file | chrome/browser/predictors/resource_prefetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698