| Index: content/browser/browser_context.cc
|
| diff --git a/content/browser/browser_context.cc b/content/browser/browser_context.cc
|
| index 170f8987ba6d3278ddccf96e74e0d9ae9e9b332a..2758c5d1d22790d402a5f02ac1852197b461ca06 100644
|
| --- a/content/browser/browser_context.cc
|
| +++ b/content/browser/browser_context.cc
|
| @@ -6,10 +6,12 @@
|
|
|
| #if !defined(OS_IOS)
|
| #include "content/browser/download/download_manager_impl.h"
|
| +#include "content/browser/fileapi/chrome_blob_storage_context.h"
|
| #include "content/browser/indexed_db/indexed_db_context_impl.h"
|
| #include "content/browser/loader/resource_dispatcher_host_impl.h"
|
| #include "content/browser/storage_partition_impl_map.h"
|
| #include "content/common/child_process_host_impl.h"
|
| +#include "content/public/browser/blob_handle.h"
|
| #include "content/public/browser/browser_thread.h"
|
| #include "content/public/browser/content_browser_client.h"
|
| #include "content/public/browser/site_instance.h"
|
| @@ -196,6 +198,20 @@ StoragePartition* BrowserContext::GetDefaultStoragePartition(
|
| return GetStoragePartition(browser_context, NULL);
|
| }
|
|
|
| +void BrowserContext::CreateMemoryBackedBlob(BrowserContext* browser_context,
|
| + const char* data, size_t length,
|
| + const BlobCallback& callback) {
|
| + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| +
|
| + ChromeBlobStorageContext* blob_context =
|
| + ChromeBlobStorageContext::GetFor(browser_context);
|
| + BrowserThread::PostTaskAndReplyWithResult(
|
| + BrowserThread::IO, FROM_HERE,
|
| + base::Bind(&ChromeBlobStorageContext::CreateMemoryBackedBlob,
|
| + make_scoped_refptr(blob_context), data, length),
|
| + callback);
|
| +}
|
| +
|
| void BrowserContext::EnsureResourceContextInitialized(BrowserContext* context) {
|
| // This will be enough to tickle initialization of BrowserContext if
|
| // necessary, which initializes ResourceContext. The reason we don't call
|
|
|