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

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

Issue 2454983002: Cache-aware Resource loading (Closed)
Patch Set: nit 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 85e674f654dc332ad398a52d224dd0b6a6cd0864..4d8e561134505287d5ee1a3298b547b8e201a085 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
+++ b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
@@ -1281,6 +1281,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
@@ -1297,6 +1301,8 @@ bool ResourceFetcher::startLoad(Resource* resource) {
storeResourceTimingInitiatorInformation(resource);
resource->setFetcherSecurityOrigin(sourceOrigin);
+
+ loader->activateCacheAwareLoadingIfNeeded(request);
loader->start(request, context().loadingTaskRunner(),
context().defersLoading());
return true;
« no previous file with comments | « third_party/WebKit/Source/core/fetch/Resource.h ('k') | third_party/WebKit/Source/core/fetch/ResourceLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698