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

Unified Diff: content/browser/bluetooth/web_bluetooth_service_impl.cc

Issue 2727683003: bluetooth: Clean up connection errors (Closed)
Patch Set: merge Created 3 years, 9 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: content/browser/bluetooth/web_bluetooth_service_impl.cc
diff --git a/content/browser/bluetooth/web_bluetooth_service_impl.cc b/content/browser/bluetooth/web_bluetooth_service_impl.cc
index 53b008e67ddf02ba7a192b7e8bd2b12fab5c36d9..f4bce42599a2dbff3057cf8d3c21a28ada910e01 100644
--- a/content/browser/bluetooth/web_bluetooth_service_impl.cc
+++ b/content/browser/bluetooth/web_bluetooth_service_impl.cc
@@ -64,33 +64,12 @@ blink::mojom::WebBluetoothResult TranslateConnectErrorAndRecord(
case device::BluetoothDevice::ERROR_UNSUPPORTED_DEVICE:
RecordConnectGATTOutcome(UMAConnectGATTOutcome::UNSUPPORTED_DEVICE);
return blink::mojom::WebBluetoothResult::CONNECT_UNSUPPORTED_DEVICE;
- case device::BluetoothDevice::ERROR_ATTRIBUTE_LENGTH_INVALID:
- RecordConnectGATTOutcome(UMAConnectGATTOutcome::ATTRIBUTE_LENGTH_INVALID);
- return blink::mojom::WebBluetoothResult::CONNECT_ATTRIBUTE_LENGTH_INVALID;
- case device::BluetoothDevice::ERROR_CONNECTION_CONGESTED:
- RecordConnectGATTOutcome(UMAConnectGATTOutcome::CONNECTION_CONGESTED);
- return blink::mojom::WebBluetoothResult::CONNECT_CONNECTION_CONGESTED;
- case device::BluetoothDevice::ERROR_INSUFFICIENT_ENCRYPTION:
- RecordConnectGATTOutcome(UMAConnectGATTOutcome::INSUFFICIENT_ENCRYPTION);
- return blink::mojom::WebBluetoothResult::CONNECT_INSUFFICIENT_ENCRYPTION;
- case device::BluetoothDevice::ERROR_OFFSET_INVALID:
- RecordConnectGATTOutcome(UMAConnectGATTOutcome::OFFSET_INVALID);
- return blink::mojom::WebBluetoothResult::CONNECT_OFFSET_INVALID;
- case device::BluetoothDevice::ERROR_READ_NOT_PERMITTED:
- RecordConnectGATTOutcome(UMAConnectGATTOutcome::READ_NOT_PERMITTED);
- return blink::mojom::WebBluetoothResult::CONNECT_READ_NOT_PERMITTED;
- case device::BluetoothDevice::ERROR_REQUEST_NOT_SUPPORTED:
- RecordConnectGATTOutcome(UMAConnectGATTOutcome::REQUEST_NOT_SUPPORTED);
- return blink::mojom::WebBluetoothResult::CONNECT_REQUEST_NOT_SUPPORTED;
- case device::BluetoothDevice::ERROR_WRITE_NOT_PERMITTED:
- RecordConnectGATTOutcome(UMAConnectGATTOutcome::WRITE_NOT_PERMITTED);
- return blink::mojom::WebBluetoothResult::CONNECT_WRITE_NOT_PERMITTED;
case device::BluetoothDevice::NUM_CONNECT_ERROR_CODES:
NOTREACHED();
- return blink::mojom::WebBluetoothResult::UNTRANSLATED_CONNECT_ERROR_CODE;
+ return blink::mojom::WebBluetoothResult::CONNECT_UNKNOWN_FAILURE;
}
NOTREACHED();
- return blink::mojom::WebBluetoothResult::UNTRANSLATED_CONNECT_ERROR_CODE;
+ return blink::mojom::WebBluetoothResult::CONNECT_UNKNOWN_FAILURE;
}
blink::mojom::WebBluetoothResult TranslateGATTErrorAndRecord(

Powered by Google App Engine
This is Rietveld 408576698