Commit 09e8b442 authored by Takuto Ikuta's avatar Takuto Ikuta Committed by Commit Bot

Fix for unused-lambda-capture warning

This CL is part of
https://chromium-review.googlesource.com/c/chromium/src/+/1286017

This CL was uploaded by git cl split.

R=jyasskin@chromium.org

Bug: 681136
Change-Id: I59478d51c2b81e5d856319871ebc76b9d2401697
Reviewed-on: https://chromium-review.googlesource.com/c/1288514Reviewed-by: default avatarGiovanni Ortuño Urquidi <ortuno@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#600979}
parent 4990e61d
...@@ -956,8 +956,8 @@ scoped_refptr<NiceMockBluetoothAdapter> LayoutTestBluetoothAdapterProvider:: ...@@ -956,8 +956,8 @@ scoped_refptr<NiceMockBluetoothAdapter> LayoutTestBluetoothAdapterProvider::
measurement_interval.get(); measurement_interval.get();
ON_CALL(*measurement_interval, ReadRemoteCharacteristic(_, _)) ON_CALL(*measurement_interval, ReadRemoteCharacteristic(_, _))
.WillByDefault(Invoke([adapter_ptr, device_ptr, measurement_ptr, .WillByDefault(Invoke(
disconnect, succeeds]( [adapter_ptr, device_ptr, disconnect, succeeds](
const BluetoothRemoteGattCharacteristic::ValueCallback& callback, const BluetoothRemoteGattCharacteristic::ValueCallback& callback,
const BluetoothRemoteGattCharacteristic::ErrorCallback& const BluetoothRemoteGattCharacteristic::ErrorCallback&
error_callback) { error_callback) {
...@@ -965,7 +965,8 @@ scoped_refptr<NiceMockBluetoothAdapter> LayoutTestBluetoothAdapterProvider:: ...@@ -965,7 +965,8 @@ scoped_refptr<NiceMockBluetoothAdapter> LayoutTestBluetoothAdapterProvider::
if (succeeds) { if (succeeds) {
pending = base::Bind(callback, std::vector<uint8_t>({1})); pending = base::Bind(callback, std::vector<uint8_t>({1}));
} else { } else {
pending = base::Bind(error_callback, pending =
base::Bind(error_callback,
BluetoothRemoteGattService::GATT_ERROR_FAILED); BluetoothRemoteGattService::GATT_ERROR_FAILED);
} }
device_ptr->PushPendingCallback(std::move(pending)); device_ptr->PushPendingCallback(std::move(pending));
...@@ -1030,17 +1031,18 @@ scoped_refptr<NiceMockBluetoothAdapter> LayoutTestBluetoothAdapterProvider:: ...@@ -1030,17 +1031,18 @@ scoped_refptr<NiceMockBluetoothAdapter> LayoutTestBluetoothAdapterProvider::
BluetoothUUID(kUserDescriptionUUID), false, BluetoothUUID(kUserDescriptionUUID), false,
device::BluetoothRemoteGattCharacteristic::PROPERTY_READ); device::BluetoothRemoteGattCharacteristic::PROPERTY_READ);
NiceMockBluetoothGattDescriptor* user_descriptor_ptr = user_descriptor.get();
ON_CALL(*user_descriptor, ReadRemoteDescriptor(_, _)) ON_CALL(*user_descriptor, ReadRemoteDescriptor(_, _))
.WillByDefault(Invoke([adapter_ptr, device_ptr, user_descriptor_ptr, .WillByDefault(Invoke(
disconnect, succeeds]( [adapter_ptr, device_ptr, disconnect, succeeds](
const BluetoothRemoteGattDescriptor::ValueCallback& callback, const BluetoothRemoteGattDescriptor::ValueCallback& callback,
const BluetoothRemoteGattDescriptor::ErrorCallback& error_callback) { const BluetoothRemoteGattDescriptor::ErrorCallback&
error_callback) {
base::Closure pending; base::Closure pending;
if (succeeds) { if (succeeds) {
pending = base::Bind(callback, std::vector<uint8_t>({1})); pending = base::Bind(callback, std::vector<uint8_t>({1}));
} else { } else {
pending = base::Bind(error_callback, pending =
base::Bind(error_callback,
BluetoothRemoteGattService::GATT_ERROR_FAILED); BluetoothRemoteGattService::GATT_ERROR_FAILED);
} }
device_ptr->PushPendingCallback(std::move(pending)); device_ptr->PushPendingCallback(std::move(pending));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment