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

Unified Diff: content/browser/cache_storage/cache_storage_cache.cc

Issue 2286833004: [CacheStorage] Keys only needs requests, not responses from QueryCache (Closed)
Patch Set: Nit Created 4 years, 4 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 | « content/browser/cache_storage/cache_storage_cache.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/cache_storage/cache_storage_cache.cc
diff --git a/content/browser/cache_storage/cache_storage_cache.cc b/content/browser/cache_storage/cache_storage_cache.cc
index d55f9cc50ce6614e71d11d8518bbad19c9c4c5ad..efd58cbb28feb596852efe91c3792da8cea9af28 100644
--- a/content/browser/cache_storage/cache_storage_cache.cc
+++ b/content/browser/cache_storage/cache_storage_cache.cc
@@ -735,10 +735,15 @@ void CacheStorageCache::QueryCacheDidReadMetadata(
QueryCacheProcessNextEntry(std::move(query_cache_results), iter + 1);
return;
}
- DCHECK_EQ(QueryCacheType::REQUESTS_AND_RESPONSES,
- query_cache_results->query_type);
query_cache_results->out_requests->push_back(request);
+ if (query_cache_results->query_type == QueryCacheType::REQUESTS) {
+ QueryCacheProcessNextEntry(std::move(query_cache_results), iter + 1);
+ return;
+ }
+
+ DCHECK_EQ(QueryCacheType::REQUESTS_AND_RESPONSES,
+ query_cache_results->query_type);
if (entry->GetDataSize(INDEX_RESPONSE_BODY) == 0) {
query_cache_results->out_responses->push_back(response);
@@ -1262,8 +1267,7 @@ void CacheStorageCache::KeysImpl(
return;
}
- QueryCache(std::move(request), options,
- QueryCacheType::REQUESTS_AND_RESPONSES,
+ QueryCache(std::move(request), options, QueryCacheType::REQUESTS,
base::Bind(&CacheStorageCache::KeysDidQueryCache,
weak_ptr_factory_.GetWeakPtr(), callback));
}
« no previous file with comments | « content/browser/cache_storage/cache_storage_cache.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698