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

Unified Diff: content/browser/appcache/appcache_request_handler_unittest.cc

Issue 1159623009: content: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test build fix. Created 5 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/appcache/appcache_request_handler_unittest.cc
diff --git a/content/browser/appcache/appcache_request_handler_unittest.cc b/content/browser/appcache/appcache_request_handler_unittest.cc
index f05fed295449569d811ed8024927bb4f3ab01ed9..3dbaf8532e76d8bdf4eee1de11e6b1755168b6bc 100644
--- a/content/browser/appcache/appcache_request_handler_unittest.cc
+++ b/content/browser/appcache/appcache_request_handler_unittest.cc
@@ -9,8 +9,10 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/callback.h"
-#include "base/message_loop/message_loop.h"
+#include "base/location.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.h"
#include "content/browser/appcache/appcache_backend_impl.h"
@@ -180,7 +182,7 @@ class AppCacheRequestHandlerTest : 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(&AppCacheRequestHandlerTest::MethodWrapper<Method>,
base::Unretained(this), method));
@@ -221,10 +223,9 @@ class AppCacheRequestHandlerTest : 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(
- FROM_HERE,
- base::Bind(&AppCacheRequestHandlerTest::TestFinishedUnwound,
- base::Unretained(this)));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(&AppCacheRequestHandlerTest::TestFinishedUnwound,
+ base::Unretained(this)));
}
void TestFinishedUnwound() {
@@ -242,7 +243,7 @@ class AppCacheRequestHandlerTest : public testing::Test {
TestFinished();
return;
}
- base::MessageLoop::current()->PostTask(FROM_HERE, task_stack_.top());
+ base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, task_stack_.top());
task_stack_.pop();
}
« no previous file with comments | « content/browser/appcache/appcache_quota_client_unittest.cc ('k') | content/browser/appcache/appcache_response.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698