From 1472c84a875c09fd4f476d9fd1b5544906b72e03 Mon Sep 17 00:00:00 2001 From: skyostil Date: Thu, 11 Jun 2015 11:40:24 -0700 Subject: chromeos: Remove use of MessageLoopProxy and deprecated MessageLoop APIs This patch was mostly autogenerated with https://codereview.chromium.org/1010073002/. BUG=465354 Review URL: https://codereview.chromium.org/1173593002 Cr-Commit-Position: refs/heads/master@{#333996} --- .../fake_bluetooth_gatt_characteristic_client.cc | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc') diff --git a/chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc b/chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc index 1f3a9bf..71a03c8 100644 --- a/chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc +++ b/chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc @@ -5,8 +5,10 @@ #include "chromeos/dbus/fake_bluetooth_gatt_characteristic_client.h" #include "base/bind.h" -#include "base/message_loop/message_loop.h" +#include "base/location.h" #include "base/rand_util.h" +#include "base/single_thread_task_runner.h" +#include "base/thread_task_runner_handle.h" #include "base/time/time.h" #include "chromeos/dbus/dbus_thread_manager.h" #include "chromeos/dbus/fake_bluetooth_gatt_descriptor_client.h" @@ -291,9 +293,8 @@ void FakeBluetoothGattCharacteristicClient::StartNotify( ScheduleHeartRateMeasurementValueChange(); // Respond asynchronously. - base::MessageLoop::current()->PostDelayedTask( - FROM_HERE, - callback, + base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( + FROM_HERE, callback, base::TimeDelta::FromMilliseconds(kStartNotifyResponseIntervalMs)); } @@ -493,13 +494,12 @@ void FakeBluetoothGattCharacteristicClient:: std::vector measurement = GetHeartRateMeasurementValue(); heart_rate_measurement_properties_->value.ReplaceValue(measurement); - base::MessageLoop::current()->PostDelayedTask( - FROM_HERE, - base::Bind(&FakeBluetoothGattCharacteristicClient:: - ScheduleHeartRateMeasurementValueChange, - weak_ptr_factory_.GetWeakPtr()), - base::TimeDelta::FromMilliseconds( - kHeartRateMeasurementNotificationIntervalMs)); + base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( + FROM_HERE, base::Bind(&FakeBluetoothGattCharacteristicClient:: + ScheduleHeartRateMeasurementValueChange, + weak_ptr_factory_.GetWeakPtr()), + base::TimeDelta::FromMilliseconds( + kHeartRateMeasurementNotificationIntervalMs)); } void FakeBluetoothGattCharacteristicClient::DelayedReadValueCallback( -- cgit v1.1