| Index: content/browser/appcache/appcache_storage_impl_unittest.cc
|
| diff --git a/content/browser/appcache/appcache_storage_impl_unittest.cc b/content/browser/appcache/appcache_storage_impl_unittest.cc
|
| index 9c980dab17e7dbd5944071c6a9850b74e19f2fca..37c295dbb433c09b4ca5f6150d480faaef914fb3 100644
|
| --- a/content/browser/appcache/appcache_storage_impl_unittest.cc
|
| +++ b/content/browser/appcache/appcache_storage_impl_unittest.cc
|
| @@ -9,11 +9,9 @@
|
| #include "base/callback.h"
|
| #include "base/files/file_util.h"
|
| #include "base/files/scoped_temp_dir.h"
|
| -#include "base/location.h"
|
| #include "base/memory/scoped_ptr.h"
|
| -#include "base/single_thread_task_runner.h"
|
| +#include "base/message_loop/message_loop.h"
|
| #include "base/synchronization/waitable_event.h"
|
| -#include "base/thread_task_runner_handle.h"
|
| #include "base/threading/thread.h"
|
| #include "content/browser/appcache/appcache.h"
|
| #include "content/browser/appcache/appcache_backend_impl.h"
|
| @@ -271,8 +269,8 @@ class AppCacheStorageImplTest : public testing::Test {
|
| MockQuotaManager()
|
| : QuotaManager(true /* is_incognito */,
|
| base::FilePath(),
|
| - io_thread->task_runner().get(),
|
| - db_thread->task_runner().get(),
|
| + io_thread->message_loop_proxy().get(),
|
| + db_thread->message_loop_proxy().get(),
|
| NULL),
|
| async_(false) {}
|
|
|
| @@ -281,9 +279,11 @@ class AppCacheStorageImplTest : public testing::Test {
|
| const GetUsageAndQuotaCallback& callback) override {
|
| EXPECT_EQ(storage::kStorageTypeTemporary, type);
|
| if (async_) {
|
| - base::ThreadTaskRunnerHandle::Get()->PostTask(
|
| - FROM_HERE, base::Bind(&MockQuotaManager::CallCallback,
|
| - base::Unretained(this), callback));
|
| + base::MessageLoop::current()->PostTask(
|
| + FROM_HERE,
|
| + base::Bind(&MockQuotaManager::CallCallback,
|
| + base::Unretained(this),
|
| + callback));
|
| return;
|
| }
|
| CallCallback(callback);
|
| @@ -370,9 +370,11 @@ class AppCacheStorageImplTest : public testing::Test {
|
| // We also have to wait for InitTask completion call to be performed
|
| // on the IO thread prior to running the test. Its guaranteed to be
|
| // queued by this time.
|
| - base::ThreadTaskRunnerHandle::Get()->PostTask(
|
| - FROM_HERE, base::Bind(&AppCacheStorageImplTest::RunMethod<Method>,
|
| - base::Unretained(this), method));
|
| + base::MessageLoop::current()->PostTask(
|
| + FROM_HERE,
|
| + base::Bind(&AppCacheStorageImplTest::RunMethod<Method>,
|
| + base::Unretained(this),
|
| + method));
|
| }
|
|
|
| static void SetUpTestCase() {
|
| @@ -398,7 +400,7 @@ class AppCacheStorageImplTest : public testing::Test {
|
| template <class Method>
|
| void RunTestOnIOThread(Method method) {
|
| test_finished_event_ .reset(new base::WaitableEvent(false, false));
|
| - io_thread->task_runner()->PostTask(
|
| + io_thread->message_loop()->PostTask(
|
| FROM_HERE, base::Bind(&AppCacheStorageImplTest::MethodWrapper<Method>,
|
| base::Unretained(this), method));
|
| test_finished_event_->Wait();
|
| @@ -429,9 +431,10 @@ class AppCacheStorageImplTest : public testing::Test {
|
| // We unwind the stack prior to finishing up to let stack
|
| // based objects get deleted.
|
| DCHECK(base::MessageLoop::current() == io_thread->message_loop());
|
| - base::ThreadTaskRunnerHandle::Get()->PostTask(
|
| - FROM_HERE, base::Bind(&AppCacheStorageImplTest::TestFinishedUnwound,
|
| - base::Unretained(this)));
|
| + base::MessageLoop::current()->PostTask(
|
| + FROM_HERE,
|
| + base::Bind(&AppCacheStorageImplTest::TestFinishedUnwound,
|
| + base::Unretained(this)));
|
| }
|
|
|
| void TestFinishedUnwound() {
|
| @@ -448,7 +451,7 @@ class AppCacheStorageImplTest : public testing::Test {
|
| if (task_stack_.empty()) {
|
| return;
|
| }
|
| - base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, task_stack_.top());
|
| + base::MessageLoop::current()->PostTask(FROM_HERE, task_stack_.top());
|
| task_stack_.pop();
|
| }
|
|
|
| @@ -460,7 +463,7 @@ class AppCacheStorageImplTest : public testing::Test {
|
| // We pump a task thru the db thread to ensure any tasks previously
|
| // scheduled on that thread have been performed prior to return.
|
| base::WaitableEvent event(false, false);
|
| - db_thread->task_runner()->PostTask(
|
| + db_thread->message_loop()->PostTask(
|
| FROM_HERE, base::Bind(&AppCacheStorageImplTest::SignalEvent, &event));
|
| event.Wait();
|
| }
|
| @@ -1729,9 +1732,11 @@ class AppCacheStorageImplTest : public testing::Test {
|
| // We continue after the init task is complete including the callback
|
| // on the current thread.
|
| FlushDbThreadTasks();
|
| - base::ThreadTaskRunnerHandle::Get()->PostTask(
|
| - FROM_HERE, base::Bind(&AppCacheStorageImplTest::Continue_Reinitialize,
|
| - base::Unretained(this), test_case));
|
| + base::MessageLoop::current()->PostTask(
|
| + FROM_HERE,
|
| + base::Bind(&AppCacheStorageImplTest::Continue_Reinitialize,
|
| + base::Unretained(this),
|
| + test_case));
|
| }
|
|
|
| void Continue_Reinitialize(ReinitTestCase test_case) {
|
|
|