Chromium Code Reviews| Index: content/browser/storage_partition_impl.cc |
| diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc |
| index e32fc72ff6d3e7c9d6f63d0698b8793c6dad9d51..443a59f77cc7ebf644f6e4a3a9f8c6e8dcce3452 100644 |
| --- a/content/browser/storage_partition_impl.cc |
| +++ b/content/browser/storage_partition_impl.cc |
| @@ -4,7 +4,9 @@ |
| #include "content/browser/storage_partition_impl.h" |
| +#include "base/sequenced_task_runner.h" |
| #include "base/strings/utf_string_conversions.h" |
| +#include "content/browser/browser_main_loop.h" |
| #include "content/browser/fileapi/browser_file_system_helper.h" |
| #include "content/browser/gpu/shader_disk_cache.h" |
| #include "content/public/browser/browser_context.h" |
| @@ -224,12 +226,19 @@ StoragePartitionImpl* StoragePartitionImpl::Create( |
| scoped_refptr<DOMStorageContextImpl> dom_storage_context = |
| new DOMStorageContextImpl(path, context->GetSpecialStoragePolicy()); |
| + // BrowserMainLoop may not be initialized in unit tests. Tests will |
| + // need to inject their own task runner into the IndexedDBContext. |
| + base::SequencedTaskRunner* idb_task_runner = |
| + BrowserThread::CurrentlyOn(BrowserThread::UI) && |
|
jam
2013/06/21 19:41:59
what is the point of the "BrowserThread::Currently
jsbell
2013/06/21 20:37:14
BrowserMainLoop::GetInstance() DCHECK()s that it's
|
| + BrowserMainLoop::GetInstance() |
| + ? BrowserMainLoop::GetInstance()->indexed_db_thread() |
| + ->message_loop_proxy() |
|
jam
2013/06/21 19:41:59
nit: this is weird formatting, usually the "->" ne
jsbell
2013/06/21 20:37:14
clang-format - I'll file a bug.
|
| + : NULL; |
| scoped_refptr<IndexedDBContextImpl> indexed_db_context = |
| new IndexedDBContextImpl(path, |
| context->GetSpecialStoragePolicy(), |
| quota_manager->proxy(), |
| - BrowserThread::GetMessageLoopProxyForThread( |
| - BrowserThread::WEBKIT_DEPRECATED).get()); |
| + idb_task_runner); |
| scoped_refptr<ChromeAppCacheService> appcache_service = |
| new ChromeAppCacheService(quota_manager->proxy()); |