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

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

Issue 2831783002: bluetooth: Clean up better 'not connected' errors (Closed)
Patch Set: Fix enum Created 3 years, 8 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 fd7cca8b53e159e2b3ed298f62ac867fd610b3a8..cb108ad89ef2e69b9dc3eb67fb5924ef07a602ed 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.cpp
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.cpp
@@ -94,7 +94,7 @@ void BluetoothRemoteGATTCharacteristic::ReadValueCallback(
// If the device is disconnected, reject.
if (!GetGatt()->RemoveFromActiveAlgorithms(resolver)) {
resolver->Reject(
- BluetoothError::CreateNotConnectedException(BluetoothOperation::GATT));
+ BluetoothError::CreateNotConnectedException(BluetoothOperation::kGATT));
return;
}
@@ -115,7 +115,7 @@ ScriptPromise BluetoothRemoteGATTCharacteristic::readValue(
if (!GetGatt()->connected()) {
return ScriptPromise::RejectWithDOMException(
script_state,
- BluetoothError::CreateNotConnectedException(BluetoothOperation::GATT));
+ BluetoothError::CreateNotConnectedException(BluetoothOperation::kGATT));
}
if (!GetGatt()->device()->IsValidCharacteristic(
@@ -150,7 +150,7 @@ void BluetoothRemoteGATTCharacteristic::WriteValueCallback(
// If the device is disconnected, reject.
if (!GetGatt()->RemoveFromActiveAlgorithms(resolver)) {
resolver->Reject(
- BluetoothError::CreateNotConnectedException(BluetoothOperation::GATT));
+ BluetoothError::CreateNotConnectedException(BluetoothOperation::kGATT));
return;
}
@@ -168,7 +168,7 @@ ScriptPromise BluetoothRemoteGATTCharacteristic::writeValue(
if (!GetGatt()->connected()) {
return ScriptPromise::RejectWithDOMException(
script_state,
- BluetoothError::CreateNotConnectedException(BluetoothOperation::GATT));
+ BluetoothError::CreateNotConnectedException(BluetoothOperation::kGATT));
}
if (!GetGatt()->device()->IsValidCharacteristic(
@@ -217,7 +217,7 @@ void BluetoothRemoteGATTCharacteristic::NotificationsCallback(
// If the device is disconnected, reject.
if (!GetGatt()->RemoveFromActiveAlgorithms(resolver)) {
resolver->Reject(
- BluetoothError::CreateNotConnectedException(BluetoothOperation::GATT));
+ BluetoothError::CreateNotConnectedException(BluetoothOperation::kGATT));
return;
}
@@ -233,7 +233,7 @@ ScriptPromise BluetoothRemoteGATTCharacteristic::startNotifications(
if (!GetGatt()->connected()) {
return ScriptPromise::RejectWithDOMException(
script_state,
- BluetoothError::CreateNotConnectedException(BluetoothOperation::GATT));
+ BluetoothError::CreateNotConnectedException(BluetoothOperation::kGATT));
}
if (!GetGatt()->device()->IsValidCharacteristic(
@@ -266,7 +266,7 @@ ScriptPromise BluetoothRemoteGATTCharacteristic::stopNotifications(
if (!GetGatt()->connected()) {
return ScriptPromise::RejectWithDOMException(
script_state,
- BluetoothError::CreateNotConnectedException(BluetoothOperation::GATT));
+ BluetoothError::CreateNotConnectedException(BluetoothOperation::kGATT));
}
if (!GetGatt()->device()->IsValidCharacteristic(

Powered by Google App Engine
This is Rietveld 408576698