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

Unified Diff: components/leveldb_proto/proto_database_impl_unittest.cc

Issue 1144153004: components: 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, 7 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: components/leveldb_proto/proto_database_impl_unittest.cc
diff --git a/components/leveldb_proto/proto_database_impl_unittest.cc b/components/leveldb_proto/proto_database_impl_unittest.cc
index e1d31440d012f8faa254a7ed9d25fca617db2724..b2fcd18548deb2c1ca7f7e8c74946b9c9045a2c7 100644
--- a/components/leveldb_proto/proto_database_impl_unittest.cc
+++ b/components/leveldb_proto/proto_database_impl_unittest.cc
@@ -9,6 +9,7 @@
#include "base/bind.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
+#include "base/location.h"
#include "base/run_loop.h"
#include "base/threading/thread.h"
#include "components/leveldb_proto/leveldb_database.h"
@@ -86,8 +87,7 @@ class ProtoDatabaseImplTest : public testing::Test {
public:
void SetUp() override {
main_loop_.reset(new MessageLoop());
- db_.reset(
- new ProtoDatabaseImpl<TestProto>(main_loop_->message_loop_proxy()));
+ db_.reset(new ProtoDatabaseImpl<TestProto>(main_loop_->task_runner()));
}
void TearDown() override {
@@ -332,8 +332,8 @@ TEST(ProtoDatabaseImplThreadingTest, TestDBDestruction) {
base::Thread db_thread("dbthread");
ASSERT_TRUE(db_thread.Start());
- scoped_ptr<ProtoDatabaseImpl<TestProto> > db(
- new ProtoDatabaseImpl<TestProto>(db_thread.message_loop_proxy()));
+ scoped_ptr<ProtoDatabaseImpl<TestProto>> db(
+ new ProtoDatabaseImpl<TestProto>(db_thread.task_runner()));
MockDatabaseCaller caller;
EXPECT_CALL(caller, InitCallback(_));
@@ -343,7 +343,7 @@ TEST(ProtoDatabaseImplThreadingTest, TestDBDestruction) {
db.reset();
base::RunLoop run_loop;
- db_thread.message_loop_proxy()->PostTaskAndReply(
+ db_thread.task_runner()->PostTaskAndReply(
FROM_HERE, base::Bind(base::DoNothing), run_loop.QuitClosure());
run_loop.Run();
}
« no previous file with comments | « components/invalidation/sync_system_resources.cc ('k') | components/metrics/call_stack_profile_metrics_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698