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

Unified Diff: extensions/browser/api/bluetooth/bluetooth_private_api.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: extensions/browser/api/bluetooth/bluetooth_private_api.cc
diff --git a/extensions/browser/api/bluetooth/bluetooth_private_api.cc b/extensions/browser/api/bluetooth/bluetooth_private_api.cc
index a006becd7817eb3fb42893153e0413dd918e6e68..79deb70543dff85869c8c92c5c673c9b89c6a2b8 100644
--- a/extensions/browser/api/bluetooth/bluetooth_private_api.cc
+++ b/extensions/browser/api/bluetooth/bluetooth_private_api.cc
@@ -515,30 +515,54 @@ void BluetoothPrivateConnectFunction::OnErrorCallback(
device::BluetoothDevice::ConnectErrorCode error) {
bt_private::ConnectResultType result = bt_private::CONNECT_RESULT_TYPE_NONE;
switch (error) {
- case device::BluetoothDevice::ERROR_UNKNOWN:
- result = bt_private::CONNECT_RESULT_TYPE_UNKNOWNERROR;
+ case device::BluetoothDevice::ERROR_ATTRIBUTE_LENGTH_INVALID:
+ result = bt_private::CONNECT_RESULT_TYPE_ATTRIBUTELENGTHINVALID;
break;
- case device::BluetoothDevice::ERROR_INPROGRESS:
- result = bt_private::CONNECT_RESULT_TYPE_INPROGRESS;
- break;
- case device::BluetoothDevice::ERROR_FAILED:
- result = bt_private::CONNECT_RESULT_TYPE_FAILED;
+ case device::BluetoothDevice::ERROR_AUTH_CANCELED:
+ result = bt_private::CONNECT_RESULT_TYPE_AUTHCANCELED;
break;
case device::BluetoothDevice::ERROR_AUTH_FAILED:
result = bt_private::CONNECT_RESULT_TYPE_AUTHFAILED;
break;
- case device::BluetoothDevice::ERROR_AUTH_CANCELED:
- result = bt_private::CONNECT_RESULT_TYPE_AUTHCANCELED;
- break;
case device::BluetoothDevice::ERROR_AUTH_REJECTED:
result = bt_private::CONNECT_RESULT_TYPE_AUTHREJECTED;
break;
case device::BluetoothDevice::ERROR_AUTH_TIMEOUT:
result = bt_private::CONNECT_RESULT_TYPE_AUTHTIMEOUT;
break;
+ case device::BluetoothDevice::ERROR_CONNECTION_CONGESTED:
+ result = bt_private::CONNECT_RESULT_TYPE_CONNECTIONCONGESTED;
+ break;
+ case device::BluetoothDevice::ERROR_FAILED:
+ result = bt_private::CONNECT_RESULT_TYPE_FAILED;
+ break;
+ case device::BluetoothDevice::ERROR_INPROGRESS:
+ result = bt_private::CONNECT_RESULT_TYPE_INPROGRESS;
+ break;
+ case device::BluetoothDevice::ERROR_INSUFFICIENT_ENCRYPTION:
+ result = bt_private::CONNECT_RESULT_TYPE_INSUFFICIENTENCRYPTION;
+ break;
+ case device::BluetoothDevice::ERROR_OFFSET_INVALID:
+ result = bt_private::CONNECT_RESULT_TYPE_OFFSETINVALID;
+ break;
+ case device::BluetoothDevice::ERROR_READ_NOT_PERMITTED:
+ result = bt_private::CONNECT_RESULT_TYPE_READNOTPERMITTED;
+ break;
+ case device::BluetoothDevice::ERROR_REQUEST_NOT_SUPPORTED:
+ result = bt_private::CONNECT_RESULT_TYPE_REQUESTNOTSUPPORTED;
+ break;
+ case device::BluetoothDevice::ERROR_UNKNOWN:
+ result = bt_private::CONNECT_RESULT_TYPE_UNKNOWNERROR;
+ break;
case device::BluetoothDevice::ERROR_UNSUPPORTED_DEVICE:
result = bt_private::CONNECT_RESULT_TYPE_UNSUPPORTEDDEVICE;
break;
+ case device::BluetoothDevice::ERROR_WRITE_NOT_PERMITTED:
+ result = bt_private::CONNECT_RESULT_TYPE_WRITENOTPERMITTED;
+ break;
+ case device::BluetoothDevice::NUM_CONNECT_ERROR_CODES:
+ NOTREACHED();
+ break;
}
// Set the result type and respond with true (success).
results_ = bt_private::Connect::Results::Create(result);

Powered by Google App Engine
This is Rietveld 408576698