Index: content/browser/appcache/appcache_response_unittest.cc |
diff --git a/content/browser/appcache/appcache_response_unittest.cc b/content/browser/appcache/appcache_response_unittest.cc |
index f5eb417dc693825bf10cb352df1cc2d7a6920468..743a624556f4bdde57993f289e669aa92e7c66db 100644 |
--- a/content/browser/appcache/appcache_response_unittest.cc |
+++ b/content/browser/appcache/appcache_response_unittest.cc |
@@ -10,8 +10,11 @@ |
#include "base/bind_helpers.h" |
#include "base/callback.h" |
#include "base/compiler_specific.h" |
+#include "base/location.h" |
#include "base/pickle.h" |
+#include "base/single_thread_task_runner.h" |
#include "base/synchronization/waitable_event.h" |
+#include "base/thread_task_runner_handle.h" |
#include "base/threading/thread.h" |
#include "content/browser/appcache/appcache_response.h" |
#include "content/browser/appcache/mock_appcache_service.h" |
@@ -75,7 +78,7 @@ class AppCacheResponseTest : public testing::Test { |
template <class Method> |
void RunTestOnIOThread(Method method) { |
test_finished_event_ .reset(new base::WaitableEvent(false, false)); |
- io_thread_->message_loop()->PostTask( |
+ io_thread_->task_runner()->PostTask( |
FROM_HERE, base::Bind(&AppCacheResponseTest::MethodWrapper<Method>, |
base::Unretained(this), method)); |
test_finished_event_->Wait(); |
@@ -116,7 +119,7 @@ class AppCacheResponseTest : 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::MessageLoop::current()->PostTask( |
+ base::ThreadTaskRunnerHandle::Get()->PostTask( |
FROM_HERE, base::Bind(&AppCacheResponseTest::TestFinishedUnwound, |
base::Unretained(this))); |
} |
@@ -146,7 +149,7 @@ class AppCacheResponseTest : public testing::Test { |
if (immediate) |
task.Run(); |
else |
- base::MessageLoop::current()->PostTask(FROM_HERE, task); |
+ base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, task); |
} |
// Wrappers to call AppCacheResponseReader/Writer Read and Write methods |
@@ -736,7 +739,7 @@ class AppCacheResponseTest : public testing::Test { |
reader_.reset(); |
// Wait a moment to verify no callbacks. |
- base::MessageLoop::current()->PostDelayedTask( |
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( |
FROM_HERE, base::Bind(&AppCacheResponseTest::VerifyNoCallbacks, |
base::Unretained(this)), |
base::TimeDelta::FromMilliseconds(10)); |