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

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

Issue 810403004: [Storage] Blob Storage Refactoring pt 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: memory leak fixed Created 5 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/service_worker/service_worker_cache_listener.cc
diff --git a/content/browser/service_worker/service_worker_cache_listener.cc b/content/browser/service_worker/service_worker_cache_listener.cc
index 15eed959913134f463011ae5b384c5d39c738907..ae85daf94031ff7c59a1458c06eade7f0cb8ef17 100644
--- a/content/browser/service_worker/service_worker_cache_listener.cc
+++ b/content/browser/service_worker/service_worker_cache_listener.cc
@@ -384,7 +384,7 @@ void ServiceWorkerCacheListener::OnCacheStorageMatchCallback(
int request_id,
ServiceWorkerCache::ErrorType error,
scoped_ptr<ServiceWorkerResponse> response,
- scoped_ptr<storage::BlobDataHandle> blob_data_handle) {
+ scoped_ptr<storage::BlobDataSnapshotHandle> blob_data_handle) {
if (error != ServiceWorkerCache::ErrorTypeOK) {
Send(ServiceWorkerMsg_CacheStorageMatchError(
request_id, CacheErrorToWebServiceWorkerCacheError(error)));
@@ -402,7 +402,7 @@ void ServiceWorkerCacheListener::OnCacheMatchCallback(
const scoped_refptr<ServiceWorkerCache>& cache,
ServiceWorkerCache::ErrorType error,
scoped_ptr<ServiceWorkerResponse> response,
- scoped_ptr<storage::BlobDataHandle> blob_data_handle) {
+ scoped_ptr<storage::BlobDataSnapshotHandle> blob_data_handle) {
if (error != ServiceWorkerCache::ErrorTypeOK) {
Send(ServiceWorkerMsg_CacheMatchError(
request_id, CacheErrorToWebServiceWorkerCacheError(error)));
@@ -458,7 +458,7 @@ void ServiceWorkerCacheListener::OnCachePutCallback(
const scoped_refptr<ServiceWorkerCache>& cache,
ServiceWorkerCache::ErrorType error,
scoped_ptr<ServiceWorkerResponse> response,
- scoped_ptr<storage::BlobDataHandle> blob_data_handle) {
+ scoped_ptr<storage::BlobDataSnapshotHandle> blob_data_handle) {
if (error != ServiceWorkerCache::ErrorTypeOK) {
Send(ServiceWorkerMsg_CacheBatchError(
request_id, CacheErrorToWebServiceWorkerCacheError(error)));
@@ -486,12 +486,14 @@ void ServiceWorkerCacheListener::DropCacheReference(CacheID cache_id) {
}
void ServiceWorkerCacheListener::StoreBlobDataHandle(
- scoped_ptr<storage::BlobDataHandle> blob_data_handle) {
+ scoped_ptr<storage::BlobDataSnapshotHandle> blob_data_handle) {
DCHECK(blob_data_handle);
std::pair<UUIDToBlobDataHandleList::iterator, bool> rv =
- blob_handle_store_.insert(std::make_pair(
- blob_data_handle->uuid(), std::list<storage::BlobDataHandle>()));
- rv.first->second.push_front(storage::BlobDataHandle(*blob_data_handle));
+ blob_handle_store_.insert(
+ std::make_pair(blob_data_handle->uuid(),
+ std::list<storage::BlobDataSnapshotHandle>()));
+ rv.first->second.push_front(
+ storage::BlobDataSnapshotHandle(*blob_data_handle));
}
void ServiceWorkerCacheListener::DropBlobDataHandle(std::string uuid) {

Powered by Google App Engine
This is Rietveld 408576698