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

Unified Diff: content/browser/service_worker/service_worker_browsertest.cc

Issue 2056983004: [CacheStorage] Give ownership of all CacheStorageCaches to CacheStorage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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
« no previous file with comments | « content/browser/renderer_host/render_message_filter.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/service_worker/service_worker_browsertest.cc
diff --git a/content/browser/service_worker/service_worker_browsertest.cc b/content/browser/service_worker/service_worker_browsertest.cc
index fae510d160824629013c23a96dad89b770795cdc..62678a05344640a2c9bfabec09eb05723c7d3acc 100644
--- a/content/browser/service_worker/service_worker_browsertest.cc
+++ b/content/browser/service_worker/service_worker_browsertest.cc
@@ -25,6 +25,7 @@
#include "build/build_config.h"
#include "content/browser/blob_storage/chrome_blob_storage_context.h"
#include "content/browser/cache_storage/cache_storage_cache.h"
+#include "content/browser/cache_storage/cache_storage_cache_handle.h"
#include "content/browser/cache_storage/cache_storage_context_impl.h"
#include "content/browser/cache_storage/cache_storage_manager.h"
#include "content/browser/service_worker/embedded_worker_instance.h"
@@ -1657,22 +1658,26 @@ class CacheStorageSideDataSizeChecker
this, result, continuation));
}
- void OnCacheStorageOpenCallback(int* result,
- const base::Closure& continuation,
- scoped_refptr<CacheStorageCache> cache,
- CacheStorageError error) {
+ void OnCacheStorageOpenCallback(
+ int* result,
+ const base::Closure& continuation,
+ std::unique_ptr<CacheStorageCacheHandle> cache_handle,
+ CacheStorageError error) {
ASSERT_EQ(CACHE_STORAGE_OK, error);
std::unique_ptr<ServiceWorkerFetchRequest> scoped_request(
new ServiceWorkerFetchRequest());
scoped_request->url = url_;
- cache->Match(std::move(scoped_request),
- base::Bind(&self::OnCacheStorageCacheMatchCallback, this,
- result, continuation));
+ CacheStorageCache* cache = cache_handle->value();
+ cache->Match(
+ std::move(scoped_request),
+ base::Bind(&self::OnCacheStorageCacheMatchCallback, this, result,
+ continuation, base::Passed(std::move(cache_handle))));
}
void OnCacheStorageCacheMatchCallback(
int* result,
const base::Closure& continuation,
+ std::unique_ptr<CacheStorageCacheHandle> cache_handle,
CacheStorageError error,
std::unique_ptr<ServiceWorkerResponse> response,
std::unique_ptr<storage::BlobDataHandle> blob_data_handle) {
« no previous file with comments | « content/browser/renderer_host/render_message_filter.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698