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

Unified Diff: third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp

Issue 2941883003: [ServiceWorker] Fetch event should return integrity value (Closed)
Patch Set: Rebase Created 3 years, 6 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
Index: third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp
diff --git a/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp b/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp
index a8e136ffb19de88e30a5aaf3961b562967f84bb9..8b12bf303c36296bc2a1c184069fb002990d511e 100644
--- a/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp
+++ b/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp
@@ -812,6 +812,8 @@ Resource* ResourceFetcher::CreateResourceForLoading(
resource->SetPreloadDiscoveryTime(params.PreloadDiscoveryTime());
}
resource->SetCacheIdentifier(cache_identifier);
+ resource->SetIntegrityMetadata(params.IntegrityMetadata());
xiaofengzhang 2017/06/19 03:17:05 This is not needed, will delete later
+ resource->SetIntegrityValue(params.IntegrityValue());
shimazu 2017/06/26 06:13:32 Also, this won't be needed if you set the value of
xiaofengzhang 2017/06/29 02:26:06 Done.
if (ShouldResourceBeAddedToMemoryCache(params, resource))
GetMemoryCache()->Add(resource);
@@ -990,7 +992,6 @@ ResourceFetcher::DetermineRevalidationPolicy(
Resource* existing_resource,
bool is_static_data) const {
const ResourceRequest& request = fetch_params.GetResourceRequest();
-
if (!existing_resource)
return kLoad;
@@ -1379,6 +1380,7 @@ bool ResourceFetcher::StartLoad(Resource* resource) {
ResourceRequest request(resource->GetResourceRequest());
ResourceLoader* loader = nullptr;
+ request.SetFetchIntegrity(AtomicString(resource->IntegrityValue()));
shimazu 2017/06/26 06:13:32 You won't be needed if the request returned by res
xiaofengzhang 2017/06/29 02:26:06 Done.
{
// Forbids JavaScript/addClient/removeClient/revalidation until start()

Powered by Google App Engine
This is Rietveld 408576698