Index: content/browser/storage_partition_impl_map.cc |
diff --git a/content/browser/storage_partition_impl_map.cc b/content/browser/storage_partition_impl_map.cc |
index d02542ca1faca0f20f68fb73c90542ba41e0ffea..48d30c8db0af09ba0bd19b6a3ac07a96078443a7 100644 |
--- a/content/browser/storage_partition_impl_map.cc |
+++ b/content/browser/storage_partition_impl_map.cc |
@@ -25,6 +25,7 @@ |
#include "content/browser/streams/stream_registry.h" |
#include "content/browser/streams/stream_url_request_job.h" |
#include "content/browser/webui/url_data_manager_backend.h" |
+#include "content/browser/worker_host/worker_storage_partition.h" |
#include "content/public/browser/browser_context.h" |
#include "content/public/browser/browser_thread.h" |
#include "content/public/browser/content_browser_client.h" |
@@ -526,6 +527,16 @@ void StoragePartitionImplMap::PostCreateInitialization( |
// Check first to avoid memory leak in unittests. |
if (BrowserThread::IsMessageLoopValid(BrowserThread::IO)) { |
+ // Since the appcache can start workers, need to give it a storage |
+ // partition those workers should use. |
+ WorkerStoragePartition worker_storage_partition( |
+ partition->GetURLRequestContext(), |
+ partition->GetMediaURLRequestContext(), |
+ partition->GetAppCacheService(), |
+ partition->GetQuotaManager(), |
+ partition->GetFileSystemContext(), |
+ partition->GetDatabaseTracker(), |
+ partition->GetIndexedDBContext()); |
BrowserThread::PostTask( |
BrowserThread::IO, FROM_HERE, |
base::Bind(&ChromeAppCacheService::InitializeOnIOThread, |
@@ -535,7 +546,10 @@ void StoragePartitionImplMap::PostCreateInitialization( |
browser_context_->GetResourceContext(), |
make_scoped_refptr(partition->GetURLRequestContext()), |
make_scoped_refptr( |
- browser_context_->GetSpecialStoragePolicy()))); |
+ browser_context_->GetSpecialStoragePolicy()), |
+ worker_storage_partition, |
+ make_scoped_refptr( |
+ ChromeBlobStorageContext::GetFor(browser_context_)))); |
// We do not call InitializeURLRequestContext() for media contexts because, |
// other than the HTTP cache, the media contexts share the same backing |