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

Side by Side 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: Created 4 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/cache_storage/cache_storage_dispatcher_host.h" 5 #include "content/browser/cache_storage/cache_storage_dispatcher_host.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 cache->MatchAll( 244 cache->MatchAll(
245 base::Bind(&CacheStorageDispatcherHost::OnCacheMatchAllCallback, this, 245 base::Bind(&CacheStorageDispatcherHost::OnCacheMatchAllCallback, this,
246 thread_id, request_id, cache)); 246 thread_id, request_id, cache));
247 return; 247 return;
248 } 248 }
249 249
250 scoped_ptr<ServiceWorkerFetchRequest> scoped_request( 250 scoped_ptr<ServiceWorkerFetchRequest> scoped_request(
251 new ServiceWorkerFetchRequest(request.url, request.method, 251 new ServiceWorkerFetchRequest(request.url, request.method,
252 request.headers, request.referrer, 252 request.headers, request.referrer,
253 request.is_reload)); 253 request.is_reload));
254 if (match_params.ignore_search) {
nhiroki 2016/01/18 04:29:59 Could you add a runtime flag for this feature and
zino 2016/01/19 13:46:38 Done.
255 cache->MatchAll(
256 std::move(scoped_request),
257 base::Bind(&CacheStorageDispatcherHost::OnCacheMatchAllCallback, this,
258 thread_id, request_id, cache));
259 return;
260 }
254 cache->Match( 261 cache->Match(
255 std::move(scoped_request), 262 std::move(scoped_request),
256 base::Bind(&CacheStorageDispatcherHost::OnCacheMatchAllCallbackAdapter, 263 base::Bind(&CacheStorageDispatcherHost::OnCacheMatchAllCallbackAdapter,
257 this, thread_id, request_id, cache)); 264 this, thread_id, request_id, cache));
258 } 265 }
259 266
260 void CacheStorageDispatcherHost::OnCacheKeys( 267 void CacheStorageDispatcherHost::OnCacheKeys(
261 int thread_id, 268 int thread_id,
262 int request_id, 269 int request_id,
263 int cache_id, 270 int cache_id,
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 UUIDToBlobDataHandleList::iterator it = blob_handle_store_.find(uuid); 514 UUIDToBlobDataHandleList::iterator it = blob_handle_store_.find(uuid);
508 if (it == blob_handle_store_.end()) 515 if (it == blob_handle_store_.end())
509 return; 516 return;
510 DCHECK(!it->second.empty()); 517 DCHECK(!it->second.empty());
511 it->second.pop_front(); 518 it->second.pop_front();
512 if (it->second.empty()) 519 if (it->second.empty())
513 blob_handle_store_.erase(it); 520 blob_handle_store_.erase(it);
514 } 521 }
515 522
516 } // namespace content 523 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698