| Index: content/browser/in_process_webkit/indexed_db_browsertest.cc
|
| diff --git a/content/browser/in_process_webkit/indexed_db_browsertest.cc b/content/browser/in_process_webkit/indexed_db_browsertest.cc
|
| index bf2f94f4f4ab7c335096974a4a51f615b5345541..c47b6296e353ea1dcc14e1a2fbfdfb6211a2e66b 100644
|
| --- a/content/browser/in_process_webkit/indexed_db_browsertest.cc
|
| +++ b/content/browser/in_process_webkit/indexed_db_browsertest.cc
|
| @@ -71,11 +71,11 @@ class IndexedDBBrowserTest : public ContentBrowserTest {
|
| EXPECT_EQ(expected_title16, title_watcher.WaitAndGetTitle());
|
| }
|
|
|
| - scoped_refptr<IndexedDBContext> GetContext() {
|
| + IndexedDBContextImpl* GetContext() {
|
| StoragePartition* partition =
|
| BrowserContext::GetDefaultStoragePartition(
|
| shell()->web_contents()->GetBrowserContext());
|
| - return partition->GetIndexedDBContext();
|
| + return static_cast<IndexedDBContextImpl*>(partition->GetIndexedDBContext());
|
| };
|
|
|
| void SetQuota(int quotaKilobytes) {
|
| @@ -102,14 +102,15 @@ class IndexedDBBrowserTest : public ContentBrowserTest {
|
| }
|
|
|
| virtual int64 RequestDiskUsage() {
|
| - BrowserThread::PostTaskAndReplyWithResult(
|
| - BrowserThread::WEBKIT_DEPRECATED, FROM_HERE,
|
| - base::Bind(&IndexedDBContext::GetOriginDiskUsage, GetContext(),
|
| - GURL("file:///")), base::Bind(
|
| - &IndexedDBBrowserTest::DidGetDiskUsage, this));
|
| + PostTaskAndReplyWithResult(
|
| + GetContext()->TaskRunner(),
|
| + FROM_HERE,
|
| + base::Bind(&IndexedDBContext::GetOriginDiskUsage,
|
| + GetContext(),
|
| + GURL("file:///")),
|
| + base::Bind(&IndexedDBBrowserTest::DidGetDiskUsage, this));
|
| scoped_refptr<base::ThreadTestHelper> helper(
|
| - new base::ThreadTestHelper(BrowserThread::GetMessageLoopProxyForThread(
|
| - BrowserThread::WEBKIT_DEPRECATED).get()));
|
| + new base::ThreadTestHelper(GetContext()->MessageLoopProxy()));
|
| EXPECT_TRUE(helper->Run());
|
| // Wait for DidGetDiskUsage to be called.
|
| base::MessageLoop::current()->RunUntilIdle();
|
| @@ -228,7 +229,7 @@ IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestWithGCExposed,
|
| static void CopyLevelDBToProfile(Shell* shell,
|
| scoped_refptr<IndexedDBContext> context,
|
| const std::string& test_directory) {
|
| - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT_DEPRECATED));
|
| + DCHECK(context->OnIndexedDBThread());
|
| base::FilePath leveldb_dir(FILE_PATH_LITERAL("file__0.indexeddb.leveldb"));
|
| base::FilePath test_data_dir =
|
| GetTestFilePath("indexeddb", test_directory.c_str()).Append(leveldb_dir);
|
| @@ -248,14 +249,13 @@ static void CopyLevelDBToProfile(Shell* shell,
|
| class IndexedDBBrowserTestWithPreexistingLevelDB : public IndexedDBBrowserTest {
|
| public:
|
| virtual void SetUpOnMainThread() OVERRIDE {
|
| - scoped_refptr<IndexedDBContext> context = GetContext();
|
| - BrowserThread::PostTask(
|
| - BrowserThread::WEBKIT_DEPRECATED, FROM_HERE,
|
| - base::Bind(&CopyLevelDBToProfile, shell(), context,
|
| - EnclosingLevelDBDir()));
|
| + scoped_refptr<IndexedDBContextImpl> context = GetContext();
|
| + context->TaskRunner()->PostTask(
|
| + FROM_HERE,
|
| + base::Bind(
|
| + &CopyLevelDBToProfile, shell(), context, EnclosingLevelDBDir()));
|
| scoped_refptr<base::ThreadTestHelper> helper(
|
| - new base::ThreadTestHelper(BrowserThread::GetMessageLoopProxyForThread(
|
| - BrowserThread::WEBKIT_DEPRECATED).get()));
|
| + new base::ThreadTestHelper(context->MessageLoopProxy()));
|
| ASSERT_TRUE(helper->Run());
|
| }
|
|
|
|
|