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

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

Issue 1578363009: CacheStorage: Add ignoreSearch option to cache.matchAll(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 10 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: content/browser/cache_storage/cache_storage_dispatcher_host.cc
diff --git a/content/browser/cache_storage/cache_storage_dispatcher_host.cc b/content/browser/cache_storage/cache_storage_dispatcher_host.cc
index d0d52072d83259015d7834534d4bdd8d1a771833..96651d13b5bb28c0cbc95d781851140ea4d1ae97 100644
--- a/content/browser/cache_storage/cache_storage_dispatcher_host.cc
+++ b/content/browser/cache_storage/cache_storage_dispatcher_host.cc
@@ -244,6 +244,7 @@ void CacheStorageDispatcherHost::OnCacheMatchAll(
scoped_refptr<CacheStorageCache> cache = it->second;
if (request.url.is_empty()) {
cache->MatchAll(
+ scoped_ptr<ServiceWorkerFetchRequest>(), match_params,
base::Bind(&CacheStorageDispatcherHost::OnCacheMatchAllCallback, this,
thread_id, request_id, cache));
return;
@@ -253,6 +254,13 @@ void CacheStorageDispatcherHost::OnCacheMatchAll(
new ServiceWorkerFetchRequest(request.url, request.method,
request.headers, request.referrer,
request.is_reload));
+ if (match_params.ignore_search) {
+ cache->MatchAll(
+ std::move(scoped_request), match_params,
+ base::Bind(&CacheStorageDispatcherHost::OnCacheMatchAllCallback, this,
+ thread_id, request_id, cache));
+ return;
+ }
cache->Match(
std::move(scoped_request),
base::Bind(&CacheStorageDispatcherHost::OnCacheMatchAllCallbackAdapter,

Powered by Google App Engine
This is Rietveld 408576698