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

Unified Diff: chrome/browser/process_singleton_posix_unittest.cc

Issue 1143343005: chrome/browser: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. 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
« no previous file with comments | « chrome/browser/process_singleton_posix.cc ('k') | chrome/browser/profiles/profile_destroyer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/process_singleton_posix_unittest.cc
diff --git a/chrome/browser/process_singleton_posix_unittest.cc b/chrome/browser/process_singleton_posix_unittest.cc
index b62e861b18186fce41837b8e640717b0e0e6414f..48d9d2fd246744de59e779cdd996cf05ae00a891 100644
--- a/chrome/browser/process_singleton_posix_unittest.cc
+++ b/chrome/browser/process_singleton_posix_unittest.cc
@@ -19,8 +19,9 @@
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
-#include "base/message_loop/message_loop.h"
+#include "base/location.h"
#include "base/posix/eintr_wrapper.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/stringprintf.h"
#include "base/synchronization/waitable_event.h"
#include "base/test/test_timeouts.h"
@@ -96,13 +97,13 @@ class ProcessSingletonPosixTest : public testing::Test {
// Destruct the ProcessSingleton object before the IO thread so that its
// internals are destructed properly.
if (process_singleton_on_thread_) {
- worker_thread_->message_loop()->PostTask(
+ worker_thread_->task_runner()->PostTask(
FROM_HERE,
base::Bind(&ProcessSingletonPosixTest::DestructProcessSingleton,
base::Unretained(this)));
- scoped_refptr<base::ThreadTestHelper> helper(new base::ThreadTestHelper(
- worker_thread_->message_loop_proxy().get()));
+ scoped_refptr<base::ThreadTestHelper> helper(
+ new base::ThreadTestHelper(worker_thread_->task_runner().get()));
ASSERT_TRUE(helper->Run());
}
@@ -115,14 +116,13 @@ class ProcessSingletonPosixTest : public testing::Test {
worker_thread_.reset(new base::Thread("BlockingThread"));
worker_thread_->Start();
- worker_thread_->message_loop()->PostTask(
- FROM_HERE,
- base::Bind(&ProcessSingletonPosixTest::
- CreateProcessSingletonInternal,
- base::Unretained(this)));
+ worker_thread_->task_runner()->PostTask(
+ FROM_HERE,
+ base::Bind(&ProcessSingletonPosixTest::CreateProcessSingletonInternal,
+ base::Unretained(this)));
scoped_refptr<base::ThreadTestHelper> helper(
- new base::ThreadTestHelper(worker_thread_->message_loop_proxy().get()));
+ new base::ThreadTestHelper(worker_thread_->task_runner().get()));
ASSERT_TRUE(helper->Run());
}
@@ -207,10 +207,9 @@ class ProcessSingletonPosixTest : public testing::Test {
}
void BlockWorkerThread() {
- worker_thread_->message_loop()->PostTask(
- FROM_HERE,
- base::Bind(&ProcessSingletonPosixTest::BlockThread,
- base::Unretained(this)));
+ worker_thread_->task_runner()->PostTask(
+ FROM_HERE, base::Bind(&ProcessSingletonPosixTest::BlockThread,
+ base::Unretained(this)));
}
void UnblockWorkerThread() {
« no previous file with comments | « chrome/browser/process_singleton_posix.cc ('k') | chrome/browser/profiles/profile_destroyer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698