Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(524)

Unified Diff: content/browser/indexed_db/indexed_db_browsertest.cc

Issue 1504033007: Move Indexed DB from dedicated thread to task scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@timer
Patch Set: Tweak traits Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/indexed_db/indexed_db_browsertest.cc
diff --git a/content/browser/indexed_db/indexed_db_browsertest.cc b/content/browser/indexed_db/indexed_db_browsertest.cc
index 85c4bee8af6147f6301e2a144d0c688c3b1b9295..b937ffce036bf9031e3b5eeeeacd28654a58d365 100644
--- a/content/browser/indexed_db/indexed_db_browsertest.cc
+++ b/content/browser/indexed_db/indexed_db_browsertest.cc
@@ -152,8 +152,8 @@ class IndexedDBBrowserTest : public ContentBrowserTest,
GURL("file:///")),
base::Bind(&IndexedDBBrowserTest::DidGetDiskUsage,
base::Unretained(this)));
- scoped_refptr<base::ThreadTestHelper> helper(new base::ThreadTestHelper(
- BrowserMainLoop::GetInstance()->indexed_db_thread()->task_runner()));
+ scoped_refptr<base::ThreadTestHelper> helper(
+ new base::ThreadTestHelper(GetContext()->TaskRunner()));
EXPECT_TRUE(helper->Run());
// Wait for DidGetDiskUsage to be called.
base::RunLoop().RunUntilIdle();
@@ -167,8 +167,8 @@ class IndexedDBBrowserTest : public ContentBrowserTest,
Origin(GURL("file:///"))),
base::Bind(&IndexedDBBrowserTest::DidGetBlobFileCount,
base::Unretained(this)));
- scoped_refptr<base::ThreadTestHelper> helper(new base::ThreadTestHelper(
- BrowserMainLoop::GetInstance()->indexed_db_thread()->task_runner()));
+ scoped_refptr<base::ThreadTestHelper> helper(
+ new base::ThreadTestHelper(GetContext()->TaskRunner()));
EXPECT_TRUE(helper->Run());
// Wait for DidGetBlobFileCount to be called.
base::RunLoop().RunUntilIdle();
@@ -333,8 +333,8 @@ class IndexedDBBrowserTestWithPreexistingLevelDB : public IndexedDBBrowserTest {
FROM_HERE,
base::Bind(
&CopyLevelDBToProfile, shell(), context, EnclosingLevelDBDir()));
- scoped_refptr<base::ThreadTestHelper> helper(new base::ThreadTestHelper(
- BrowserMainLoop::GetInstance()->indexed_db_thread()->task_runner()));
+ scoped_refptr<base::ThreadTestHelper> helper(
+ new base::ThreadTestHelper(GetContext()->TaskRunner()));
ASSERT_TRUE(helper->Run());
}
@@ -499,8 +499,8 @@ IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, DeleteForOriginDeletesBlobs) {
base::Bind(static_cast<void (IndexedDBContextImpl::*)(const GURL&)>(
&IndexedDBContextImpl::DeleteForOrigin),
GetContext(), GURL("file:///")));
- scoped_refptr<base::ThreadTestHelper> helper(new base::ThreadTestHelper(
- BrowserMainLoop::GetInstance()->indexed_db_thread()->task_runner()));
+ scoped_refptr<base::ThreadTestHelper> helper(
+ new base::ThreadTestHelper(GetContext()->TaskRunner()));
ASSERT_TRUE(helper->Run());
EXPECT_EQ(0, RequestDiskUsage());
}
« no previous file with comments | « content/browser/indexed_db/indexed_db_backing_store.cc ('k') | content/browser/indexed_db/indexed_db_callbacks.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698