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

Unified Diff: content/browser/storage_partition_impl.cc

Issue 992353003: Decouple Cache Storage messaging from Service Worker/Embedded Worker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused public stubs Created 5 years, 9 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/storage_partition_impl.cc
diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc
index 4bce3ab59aaacb12d9033797b5c5b36f9d9dab37..24426cf8265655bdf692dfb50ea6ce3337370e52 100644
--- a/content/browser/storage_partition_impl.cc
+++ b/content/browser/storage_partition_impl.cc
@@ -369,6 +369,7 @@ StoragePartitionImpl::StoragePartitionImpl(
storage::DatabaseTracker* database_tracker,
DOMStorageContextWrapper* dom_storage_context,
IndexedDBContextImpl* indexed_db_context,
+ CacheStorageContextImpl* cache_storage_context,
ServiceWorkerContextWrapper* service_worker_context,
WebRTCIdentityStore* webrtc_identity_store,
storage::SpecialStoragePolicy* special_storage_policy,
@@ -382,6 +383,7 @@ StoragePartitionImpl::StoragePartitionImpl(
database_tracker_(database_tracker),
dom_storage_context_(dom_storage_context),
indexed_db_context_(indexed_db_context),
+ cache_storage_context_(cache_storage_context),
service_worker_context_(service_worker_context),
webrtc_identity_store_(webrtc_identity_store),
special_storage_policy_(special_storage_policy),
@@ -412,6 +414,9 @@ StoragePartitionImpl::~StoragePartitionImpl() {
if (GetServiceWorkerContext())
GetServiceWorkerContext()->Shutdown();
+ if (GetCacheStorageContext())
+ GetCacheStorageContext()->Shutdown();
+
if (GetGeofencingManager())
GetGeofencingManager()->Shutdown();
}
@@ -469,10 +474,15 @@ StoragePartitionImpl* StoragePartitionImpl::Create(
quota_manager->proxy(),
idb_task_runner);
+ scoped_refptr<CacheStorageContextImpl> cache_storage_context =
+ new CacheStorageContextImpl(context);
+ cache_storage_context->Init(path, quota_manager->proxy(),
+ context->GetSpecialStoragePolicy());
+
scoped_refptr<ServiceWorkerContextWrapper> service_worker_context =
new ServiceWorkerContextWrapper(context);
- service_worker_context->Init(
- path, quota_manager->proxy(), context->GetSpecialStoragePolicy());
+ service_worker_context->Init(path, quota_manager->proxy(),
+ context->GetSpecialStoragePolicy());
scoped_refptr<ChromeAppCacheService> appcache_service =
new ChromeAppCacheService(quota_manager->proxy());
@@ -500,9 +510,10 @@ StoragePartitionImpl* StoragePartitionImpl::Create(
context, partition_path, quota_manager.get(), appcache_service.get(),
filesystem_context.get(), database_tracker.get(),
dom_storage_context.get(), indexed_db_context.get(),
- service_worker_context.get(), webrtc_identity_store.get(),
- special_storage_policy.get(), geofencing_manager.get(),
- host_zoom_level_context.get(), navigator_connect_context.get());
+ cache_storage_context.get(), service_worker_context.get(),
+ webrtc_identity_store.get(), special_storage_policy.get(),
+ geofencing_manager.get(), host_zoom_level_context.get(),
+ navigator_connect_context.get());
service_worker_context->set_storage_partition(storage_partition);
@@ -546,6 +557,10 @@ IndexedDBContextImpl* StoragePartitionImpl::GetIndexedDBContext() {
return indexed_db_context_.get();
}
+CacheStorageContextImpl* StoragePartitionImpl::GetCacheStorageContext() {
+ return cache_storage_context_.get();
+}
+
ServiceWorkerContextWrapper* StoragePartitionImpl::GetServiceWorkerContext() {
return service_worker_context_.get();
}

Powered by Google App Engine
This is Rietveld 408576698