summaryrefslogtreecommitdiffstats
path: root/chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc
diff options
context:
space:
mode:
authorskyostil <skyostil@chromium.org>2015-06-11 11:40:24 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-11 18:42:15 +0000
commit1472c84a875c09fd4f476d9fd1b5544906b72e03 (patch)
tree59b7979068ab539ae03351455eec84253fed7ffc /chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc
parent0b35325d7b5e25f4942f79e3f4d6269c36f1c2e0 (diff)
downloadchromium_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.cc22
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(