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

Unified Diff: components/pairing/fake_controller_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
« no previous file with comments | « components/ownership/owner_settings_service.cc ('k') | components/pairing/fake_host_pairing_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/pairing/fake_controller_pairing_controller.cc
diff --git a/components/pairing/fake_controller_pairing_controller.cc b/components/pairing/fake_controller_pairing_controller.cc
index 89a076103eddc459281b5fa6992e879f421e556c..24069e23776187716dfdaa0f58527aa3bc16ae94 100644
--- a/components/pairing/fake_controller_pairing_controller.cc
+++ b/components/pairing/fake_controller_pairing_controller.cc
@@ -7,12 +7,14 @@
#include <map>
#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/strings/string_util.h"
+#include "base/threading/thread_task_runner_handle.h"
namespace pairing_chromeos {
@@ -235,11 +237,9 @@ void FakeControllerPairingController::ChangeStage(Stage new_stage) {
}
void FakeControllerPairingController::ChangeStageLater(Stage new_stage) {
- base::MessageLoop::current()->PostDelayedTask(
- FROM_HERE,
- base::Bind(&FakeControllerPairingController::ChangeStage,
- base::Unretained(this),
- new_stage),
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
+ FROM_HERE, base::Bind(&FakeControllerPairingController::ChangeStage,
+ base::Unretained(this), new_stage),
async_duration_);
}
@@ -266,11 +266,10 @@ void FakeControllerPairingController::ExecuteDiscoveryEvent(
if (++event_position == discovery_scenario_.size()) {
return;
}
- base::MessageLoop::current()->PostDelayedTask(
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE,
base::Bind(&FakeControllerPairingController::ExecuteDiscoveryEvent,
- base::Unretained(this),
- event_position),
+ base::Unretained(this), event_position),
async_duration_);
}
@@ -292,11 +291,10 @@ void FakeControllerPairingController::PairingStageChanged(Stage new_stage) {
switch (new_stage) {
case STAGE_DEVICES_DISCOVERY: {
discovered_devices_.clear();
- base::MessageLoop::current()->PostDelayedTask(
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE,
base::Bind(&FakeControllerPairingController::ExecuteDiscoveryEvent,
- base::Unretained(this),
- 0),
+ base::Unretained(this), 0),
async_duration_);
break;
}
« no previous file with comments | « components/ownership/owner_settings_service.cc ('k') | components/pairing/fake_host_pairing_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698