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

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

Issue 2454983002: Cache-aware Resource loading (Closed)
Patch Set: move options check into loader, rename & comments Created 4 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
Index: third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
index 87844840edb85a80b9c188695d2e0aa0de7adc67..99da6287e6a5cb3126286ae489ea1196afcc3a77 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
+++ b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
@@ -1284,6 +1284,10 @@ bool ResourceFetcher::startLoad(Resource* resource) {
willSendRequest(resource->identifier(), request, ResourceResponse(),
resource->options());
+ // TODO(shaochuan): Saving modified ResourceRequest back to |resource|, remove
+ // once willSendRequest() takes const ResourceRequest. crbug.com/632580
+ resource->setResourceRequest(request);
+
// Resource requests from suborigins should not be intercepted by the service
// worker of the physical origin. This has the effect that, for now,
// suborigins do not work with service workers. See
@@ -1300,6 +1304,8 @@ bool ResourceFetcher::startLoad(Resource* resource) {
storeResourceTimingInitiatorInformation(resource);
resource->setFetcherSecurityOrigin(sourceOrigin);
+
+ loader->activateCacheAwareLoadingIfNeeded(request);
loader->start(request, context().loadingTaskRunner(),
context().defersLoading());
return true;

Powered by Google App Engine
This is Rietveld 408576698