| Index: content/browser/fileapi/chrome_blob_storage_context.cc
|
| diff --git a/content/browser/fileapi/chrome_blob_storage_context.cc b/content/browser/fileapi/chrome_blob_storage_context.cc
|
| index 728b0d58e253237ca8087087d7c24618c3be17f9..5f5b83e008c4f3b3104ae6bfc0c566b0a88b7022 100644
|
| --- a/content/browser/fileapi/chrome_blob_storage_context.cc
|
| +++ b/content/browser/fileapi/chrome_blob_storage_context.cc
|
| @@ -5,6 +5,7 @@
|
| #include "content/browser/fileapi/chrome_blob_storage_context.h"
|
|
|
| #include "base/bind.h"
|
| +#include "content/browser/streams/stream_registry.h"
|
| #include "content/public/browser/browser_context.h"
|
| #include "content/public/browser/browser_thread.h"
|
| #include "webkit/browser/blob/blob_storage_controller.h"
|
| @@ -41,11 +42,16 @@ ChromeBlobStorageContext* ChromeBlobStorageContext::GetFor(
|
| void ChromeBlobStorageContext::InitializeOnIOThread() {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
|
| controller_.reset(new BlobStorageController());
|
| + stream_registry_.reset(new StreamRegistry());
|
| }
|
|
|
| ChromeBlobStorageContext::~ChromeBlobStorageContext() {}
|
|
|
| void ChromeBlobStorageContext::DeleteOnCorrectThread() const {
|
| + // In many tests, there isn't a valid IO thread. In that case, just delete on
|
| + // the current thread.
|
| + // TODO(tyoshino): Remove this custom deleter, and fix the leaks in all the
|
| + // tests.
|
| if (BrowserThread::IsMessageLoopValid(BrowserThread::IO) &&
|
| !BrowserThread::CurrentlyOn(BrowserThread::IO)) {
|
| BrowserThread::DeleteSoon(BrowserThread::IO, FROM_HERE, this);
|
|
|