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

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

Issue 2721233002: bluetooth: Better disconnected error messages for characteristic retrieval. (Closed)
Patch Set: Fix win compile error 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/BluetoothRemoteGATTService.cpp
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.cpp b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.cpp
index fcdf5d3acf0b5dedd89289e899b5c9e4d5b0bebc..757637ae5fee91e9f9ab0622c81fc80e8e783ac7 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.cpp
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.cpp
@@ -48,9 +48,8 @@ void BluetoothRemoteGATTService::GetCharacteristicsCallback(
// If the device is disconnected, reject.
if (!device()->gatt()->RemoveFromActiveAlgorithms(resolver)) {
- resolver->reject(BluetoothError::createDOMException(
- mojom::blink::WebBluetoothResult::
- GATT_SERVER_DISCONNECTED_WHILE_RETRIEVING_CHARACTERISTICS));
+ resolver->reject(BluetoothError::createNotConnectedException(
+ BluetoothOperation::CharacteristicsRetrieval));
return;
}
@@ -127,10 +126,8 @@ ScriptPromise BluetoothRemoteGATTService::getCharacteristicsImpl(
const String& characteristicsUUID) {
if (!device()->gatt()->connected()) {
return ScriptPromise::rejectWithDOMException(
- scriptState,
- BluetoothError::createDOMException(
- mojom::blink::WebBluetoothResult::
- GATT_SERVER_NOT_CONNECTED_CANNOT_RETRIEVE_CHARACTERISTICS));
+ scriptState, BluetoothError::createNotConnectedException(
+ BluetoothOperation::CharacteristicsRetrieval));
}
if (!device()->isValidService(m_service->instance_id)) {

Powered by Google App Engine
This is Rietveld 408576698