diff options
author | skyostil <skyostil@chromium.org> | 2015-06-11 11:40:24 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-11 18:42:15 +0000 |
commit | 1472c84a875c09fd4f476d9fd1b5544906b72e03 (patch) | |
tree | 59b7979068ab539ae03351455eec84253fed7ffc /chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc | |
parent | 0b35325d7b5e25f4942f79e3f4d6269c36f1c2e0 (diff) | |
download | chromium_src-1472c84a875c09fd4f476d9fd1b5544906b72e03.zip chromium_src-1472c84a875c09fd4f476d9fd1b5544906b72e03.tar.gz chromium_src-1472c84a875c09fd4f476d9fd1b5544906b72e03.tar.bz2 |
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}
Diffstat (limited to 'chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc')
-rw-r--r-- | chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc | 22 |
1 files changed, 11 insertions, 11 deletions
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<uint8> 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( |