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

Unified Diff: components/pairing/fake_host_pairing_controller.cc

Issue 2037843002: Remove use of deprecated MessageLoop methods in components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change precache 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: components/pairing/fake_host_pairing_controller.cc
diff --git a/components/pairing/fake_host_pairing_controller.cc b/components/pairing/fake_host_pairing_controller.cc
index 21d9f180a1e32327667ef74f3f739137c88b963e..69aba2db6113bbe2bc455f419edaa4088161ed63 100644
--- a/components/pairing/fake_host_pairing_controller.cc
+++ b/components/pairing/fake_host_pairing_controller.cc
@@ -10,11 +10,13 @@
#include <vector>
#include "base/bind.h"
+#include "base/location.h"
#include "base/logging.h"
-#include "base/message_loop/message_loop.h"
#include "base/rand_util.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
+#include "base/threading/thread_task_runner_handle.h"
namespace {
@@ -82,11 +84,9 @@ void FakeHostPairingController::ChangeStage(Stage new_stage) {
}
void FakeHostPairingController::ChangeStageLater(Stage new_stage) {
- base::MessageLoop::current()->PostDelayedTask(
- FROM_HERE,
- base::Bind(&FakeHostPairingController::ChangeStage,
- base::Unretained(this),
- new_stage),
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
+ FROM_HERE, base::Bind(&FakeHostPairingController::ChangeStage,
+ base::Unretained(this), new_stage),
async_duration_);
}

Powered by Google App Engine
This is Rietveld 408576698