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

Unified Diff: device/bluetooth/bluetooth_remote_gatt_descriptor_android.cc

Issue 2031743005: Remove use of deprecated MessageLoop methods in device. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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: device/bluetooth/bluetooth_remote_gatt_descriptor_android.cc
diff --git a/device/bluetooth/bluetooth_remote_gatt_descriptor_android.cc b/device/bluetooth/bluetooth_remote_gatt_descriptor_android.cc
index 9e238c773b133de8a118f0fd0c2657338292e5dc..32e753fa4d8b571d90ab5c74d1f74693ee8f5aba 100644
--- a/device/bluetooth/bluetooth_remote_gatt_descriptor_android.cc
+++ b/device/bluetooth/bluetooth_remote_gatt_descriptor_android.cc
@@ -10,8 +10,10 @@
#include "base/android/jni_array.h"
#include "base/android/jni_string.h"
#include "base/bind.h"
+#include "base/location.h"
#include "base/logging.h"
-#include "base/message_loop/message_loop.h"
+#include "base/single_thread_task_runner.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "device/bluetooth/bluetooth_gatt_notify_session_android.h"
#include "device/bluetooth/bluetooth_remote_gatt_service_android.h"
#include "jni/ChromeBluetoothRemoteGattDescriptor_jni.h"
@@ -86,7 +88,7 @@ void BluetoothRemoteGattDescriptorAndroid::ReadRemoteDescriptor(
const ValueCallback& callback,
const ErrorCallback& error_callback) {
if (read_pending_ || write_pending_) {
- base::MessageLoop::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::Bind(error_callback,
BluetoothRemoteGattService::GATT_ERROR_IN_PROGRESS));
@@ -95,7 +97,7 @@ void BluetoothRemoteGattDescriptorAndroid::ReadRemoteDescriptor(
if (!Java_ChromeBluetoothRemoteGattDescriptor_readRemoteDescriptor(
AttachCurrentThread(), j_descriptor_.obj())) {
- base::MessageLoop::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::Bind(error_callback,
BluetoothRemoteGattServiceAndroid::GATT_ERROR_FAILED));
@@ -112,7 +114,7 @@ void BluetoothRemoteGattDescriptorAndroid::WriteRemoteDescriptor(
const base::Closure& callback,
const ErrorCallback& error_callback) {
if (read_pending_ || write_pending_) {
- base::MessageLoop::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::Bind(error_callback,
BluetoothRemoteGattService::GATT_ERROR_IN_PROGRESS));
@@ -123,7 +125,7 @@ void BluetoothRemoteGattDescriptorAndroid::WriteRemoteDescriptor(
if (!Java_ChromeBluetoothRemoteGattDescriptor_writeRemoteDescriptor(
env, j_descriptor_.obj(),
base::android::ToJavaByteArray(env, new_value).obj())) {
- base::MessageLoop::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::Bind(error_callback,
BluetoothRemoteGattServiceAndroid::GATT_ERROR_FAILED));
« no previous file with comments | « device/bluetooth/bluetooth_remote_gatt_characteristic_android.cc ('k') | device/bluetooth/bluez/bluetooth_socket_bluez.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698