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

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: 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: 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 d69a08aa8a67c9dfdaf64637f8ae23e59e11cb61..d624ac1444aec26f6046a41dae61bea33ee7e663 100644
--- a/extensions/browser/api/bluetooth/bluetooth_private_api.cc
+++ b/extensions/browser/api/bluetooth/bluetooth_private_api.cc
@@ -535,6 +535,27 @@ void BluetoothPrivateConnectFunction::OnErrorCallback(
case device::BluetoothDevice::ERROR_UNSUPPORTED_DEVICE:
result = bt_private::CONNECT_RESULT_TYPE_UNSUPPORTEDDEVICE;
break;
+ case device::BluetoothDevice::ERROR_ATTRIBUTE_LENGTH_INVALID:
+ result = bt_private::CONNECT_RESULT_TYPE_ATTRIBUTELENGTHINVALID;
+ break;
+ case device::BluetoothDevice::ERROR_CONNECTION_CONGESTED:
+ result = bt_private::CONNECT_RESULT_TYPE_CONNECTIONCONGESTED;
+ 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_FAILED:
+ result = bt_private::CONNECT_RESULT_TYPE_READFAILED;
+ break;
+ case device::BluetoothDevice::ERROR_REQUEST_NOT_SUPPORTED:
+ result = bt_private::CONNECT_RESULT_TYPE_REQUESTNOTSUPPORTED;
+ break;
+ case device::BluetoothDevice::ERROR_WRITE_FAILED:
Kai Jiang 2015/11/29 10:40:51 ERROR_{READ, WRITE}_NOT_PERMITTED
+ result = bt_private::CONNECT_RESULT_TYPE_WRITEFAILED;
+ break;
Kai Jiang 2015/11/29 10:40:51 sorted above.
}
// 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