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

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: III Created 5 years, 1 month 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 d655d9d017a09b735357242ecedebf4450637300..6d62ad3afa4d1784a215d19b12f16f21dc9d5b0f 100644
--- a/content/browser/bluetooth/bluetooth_dispatcher_host.cc
+++ b/content/browser/bluetooth/bluetooth_dispatcher_host.cc
@@ -134,6 +134,27 @@ WebBluetoothError TranslateConnectError(
case device::BluetoothDevice::ERROR_UNSUPPORTED_DEVICE:
RecordConnectGATTOutcome(UMAConnectGATTOutcome::UNSUPPORTED_DEVICE);
return WebBluetoothError::ConnectUnsupportedDevice;
+ case device::BluetoothDevice::ERROR_ATTRIBUTE_LENGTH_INVALID:
scheib 2015/11/26 00:02:51 Sort list.
+ 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_FAILED:
+ RecordConnectGATTOutcome(UMAConnectGATTOutcome::READ_FAILED);
+ return WebBluetoothError::ConnectReadFailed;
+ case device::BluetoothDevice::ERROR_REQUEST_NOT_SUPPORTED:
+ RecordConnectGATTOutcome(UMAConnectGATTOutcome::REQUEST_NOT_SUPPORTED);
+ return WebBluetoothError::ConnectRequestNotSupported;
+ case device::BluetoothDevice::ERROR_WRITE_FAILED:
+ RecordConnectGATTOutcome(UMAConnectGATTOutcome::WRITE_FAILED);
+ return WebBluetoothError::ConnectWriteFailed;
}
NOTREACHED();
return WebBluetoothError::UntranslatedConnectErrorCode;

Powered by Google App Engine
This is Rietveld 408576698