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

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

Issue 2680783002: bluetooth: show better error messages for services, characteristics and descriptors (Closed)
Patch Set: Added comment and changed to enum class. 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/BluetoothRemoteGATTUtils.cpp
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTUtils.cpp b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTUtils.cpp
index f41787190932056cd20e7af05e2d2314d00c13be..6f00640e4dac95db49f3fd155fe9928ee446357d 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTUtils.cpp
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTUtils.cpp
@@ -16,35 +16,4 @@ DOMDataView* BluetoothRemoteGATTUtils::ConvertWTFVectorToDataView(
return DOMDataView::create(domBuffer, 0, wtfVector.size());
}
-// static
-DOMException* BluetoothRemoteGATTUtils::CreateDOMException(ExceptionType type) {
- switch (type) {
- case ExceptionType::kGATTServerDisconnected:
- return DOMException::create(
- NetworkError,
- "GATT Server disconnected while performing a GATT operation.");
-
- case ExceptionType::kGATTServerNotConnected:
- return DOMException::create(
- NetworkError,
- "GATT Server is disconnected. Cannot perform GATT operations.");
-
- case ExceptionType::kInvalidCharacteristic:
- return DOMException::create(
- InvalidStateError,
- "Characteristic is no longer valid. Remember to retrieve the "
- "characteristic again after reconnecting.");
-
- case ExceptionType::kInvalidDescriptor:
- return DOMException::create(
- InvalidStateError,
- "Descriptor is no longer valid. Remember to retrieve the "
- "Descriptor again after reconnecting.");
-
- default:
- NOTREACHED();
- return nullptr;
- }
-}
-
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698