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

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

Issue 1464443002: bluetooth: android: Add BluetoothDevice::ConnectErrorCode enums (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: VI Created 4 years, 11 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/bluetooth_dispatcher_host.cc
diff --git a/content/browser/bluetooth/bluetooth_dispatcher_host.cc b/content/browser/bluetooth/bluetooth_dispatcher_host.cc
index 56a1d4f3f1cf73eb7c6213a0a3419eeee76e3ca5..51437dbc18dcb8e611855327d48be1fc646edc0b 100644
--- a/content/browser/bluetooth/bluetooth_dispatcher_host.cc
+++ b/content/browser/bluetooth/bluetooth_dispatcher_host.cc
@@ -138,6 +138,30 @@ WebBluetoothError TranslateConnectError(
case device::BluetoothDevice::ERROR_UNSUPPORTED_DEVICE:
RecordConnectGATTOutcome(UMAConnectGATTOutcome::UNSUPPORTED_DEVICE);
return WebBluetoothError::ConnectUnsupportedDevice;
+ case device::BluetoothDevice::ERROR_ATTRIBUTE_LENGTH_INVALID:
+ RecordConnectGATTOutcome(UMAConnectGATTOutcome::ATTRIBUTE_LENGTH_INVALID);
+ return WebBluetoothError::ConnectAttributeLengthInvalid;
+ case device::BluetoothDevice::ERROR_CONNECTION_CONGESTED:
+ RecordConnectGATTOutcome(UMAConnectGATTOutcome::CONNECTION_CONGESTED);
+ return WebBluetoothError::ConnectConnectionCongested;
+ case device::BluetoothDevice::ERROR_INSUFFICIENT_ENCRYPTION:
+ RecordConnectGATTOutcome(UMAConnectGATTOutcome::INSUFFICIENT_ENCRYPTION);
+ return WebBluetoothError::ConnectInsufficientEncryption;
+ case device::BluetoothDevice::ERROR_OFFSET_INVALID:
+ RecordConnectGATTOutcome(UMAConnectGATTOutcome::OFFSET_INVALID);
+ return WebBluetoothError::ConnectOffsetInvalid;
+ case device::BluetoothDevice::ERROR_READ_NOT_PERMITTED:
+ RecordConnectGATTOutcome(UMAConnectGATTOutcome::READ_NOT_PERMITTED);
+ return WebBluetoothError::ConnectReadNotPermitted;
+ case device::BluetoothDevice::ERROR_REQUEST_NOT_SUPPORTED:
+ RecordConnectGATTOutcome(UMAConnectGATTOutcome::REQUEST_NOT_SUPPORTED);
+ return WebBluetoothError::ConnectRequestNotSupported;
+ case device::BluetoothDevice::ERROR_WRITE_NOT_PERMITTED:
+ RecordConnectGATTOutcome(UMAConnectGATTOutcome::WRITE_NOT_PERMITTED);
+ return WebBluetoothError::ConnectWriteNotPermitted;
+ case device::BluetoothDevice::NUM_CONNECT_ERROR_CODES:
+ NOTREACHED();
+ return WebBluetoothError::UntranslatedConnectErrorCode;
}
NOTREACHED();
return WebBluetoothError::UntranslatedConnectErrorCode;

Powered by Google App Engine
This is Rietveld 408576698