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

Unified Diff: third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.cpp

Issue 2736433003: Clean up web bluetooth related code (Closed)
Patch Set: clean up web bluetooth related code Created 3 years, 10 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: third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.cpp
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.cpp b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.cpp
index 0088df16c6780168063af4f5f0230a209b6ed3f5..94af3f757a7229d9e79f2478d0ed9605d05b9564 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.cpp
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.cpp
@@ -380,7 +380,7 @@ void BluetoothRemoteGATTCharacteristic::GetDescriptorsCallback(
return;
// If the device is disconnected, reject.
- if (!service()->device()->gatt()->RemoveFromActiveAlgorithms(resolver)) {
+ if (!m_service->device()->gatt()->RemoveFromActiveAlgorithms(resolver)) {
resolver->reject(BluetoothError::createDOMException(
blink::mojom::WebBluetoothResult::GATT_SERVER_DISCONNECTED));
return;
@@ -392,7 +392,7 @@ void BluetoothRemoteGATTCharacteristic::GetDescriptorsCallback(
if (quantity == mojom::blink::WebBluetoothGATTQueryQuantity::SINGLE) {
DCHECK_EQ(1u, descriptors->size());
resolver->resolve(
- service()->device()->getOrCreateBluetoothRemoteGATTDescriptor(
+ m_service->device()->getOrCreateBluetoothRemoteGATTDescriptor(
std::move(descriptors.value()[0]), this));
return;
}
@@ -401,7 +401,7 @@ void BluetoothRemoteGATTCharacteristic::GetDescriptorsCallback(
gattDescriptors.reserveInitialCapacity(descriptors->size());
for (auto& descriptor : descriptors.value()) {
gattDescriptors.push_back(
- service()->device()->getOrCreateBluetoothRemoteGATTDescriptor(
+ m_service->device()->getOrCreateBluetoothRemoteGATTDescriptor(
std::move(descriptor), this));
}
resolver->resolve(gattDescriptors);

Powered by Google App Engine
This is Rietveld 408576698