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

Unified Diff: Source/core/fetch/ResourceFetcher.cpp

Issue 711213002: ResourceFetcher::requestPreload should set its requestContext (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: keep special casing for image prefetch Created 6 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/ResourceFetcher.cpp
diff --git a/Source/core/fetch/ResourceFetcher.cpp b/Source/core/fetch/ResourceFetcher.cpp
index 81f56c4d602211d12db00e585140c541e7124199..7199fe569dc66a0043ab320c5984b35a28a3083b 100644
--- a/Source/core/fetch/ResourceFetcher.cpp
+++ b/Source/core/fetch/ResourceFetcher.cpp
@@ -1253,6 +1253,8 @@ void ResourceFetcher::requestPreload(Resource::Type type, FetchRequest& request,
// Loading images involves several special cases, so use dedicated fetch method instead.
if (type == Resource::Image)
resource = fetchImage(request);
+
+ request.mutableResourceRequest().setRequestContext(WebURLRequest::RequestContextPrefetch);
tyoshino (SeeGerritForStatus) 2014/11/11 07:57:26 This looked the "context" defined in the Fetch Sta
Mike West 2014/11/11 08:08:04 I don't understand this comment? The `prefetch` co
tyoshino (SeeGerritForStatus) 2014/11/11 08:20:36 I wrote "not yet" since you've renamed it in https
tyoshino (SeeGerritForStatus) 2014/11/11 08:24:41 OK. Regarding mixed content, just issuing a reque
tyoshino (SeeGerritForStatus) 2014/11/11 08:30:44 By "deliver", I mean having it evaluated, displaye
if (!resource)
resource = requestResource(type, request);
if (!resource || (m_preloads && m_preloads->contains(resource.get())))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698