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

Unified Diff: sync/internal_api/public/util/weak_handle_unittest.cc

Issue 2086363002: Remove calls to deprecated MessageLoop methods in sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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: sync/internal_api/public/util/weak_handle_unittest.cc
diff --git a/sync/internal_api/public/util/weak_handle_unittest.cc b/sync/internal_api/public/util/weak_handle_unittest.cc
index 44b579563867611dee0cad4cc959ad59e556cb4c..b7414dc7f733b26b62a94ab36215fbe1f8509bd6 100644
--- a/sync/internal_api/public/util/weak_handle_unittest.cc
+++ b/sync/internal_api/public/util/weak_handle_unittest.cc
@@ -9,6 +9,7 @@
#include "base/location.h"
#include "base/memory/weak_ptr.h"
#include "base/run_loop.h"
+#include "base/single_thread_task_runner.h"
#include "base/threading/thread.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -60,7 +61,7 @@ class WeakHandleTest : public ::testing::Test {
const WeakHandle<Base>& h) {
base::Thread t("Test thread");
ASSERT_TRUE(t.Start());
- t.message_loop()->PostTask(
+ t.task_runner()->PostTask(
from_here, base::Bind(&WeakHandleTest::CallTest, from_here, h));
}
@@ -200,7 +201,7 @@ TEST_F(WeakHandleTest, DeleteOnOtherThread) {
{
base::Thread t("Test thread");
ASSERT_TRUE(t.Start());
- t.message_loop()->DeleteSoon(FROM_HERE, h);
+ t.task_runner()->DeleteSoon(FROM_HERE, h);
}
PumpLoop();
@@ -219,9 +220,8 @@ TEST_F(WeakHandleTest, WithDestroyedThread) {
{
base::Thread t("Test thread");
ASSERT_TRUE(t.Start());
- t.message_loop()->PostTask(FROM_HERE,
- base::Bind(&CallTestWithSelf,
- b1.AsWeakHandle()));
+ t.task_runner()->PostTask(FROM_HERE,
+ base::Bind(&CallTestWithSelf, b1.AsWeakHandle()));
}
// Calls b1.TestWithSelf().

Powered by Google App Engine
This is Rietveld 408576698