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

Unified Diff: chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.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: chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.cc
diff --git a/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.cc b/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.cc
index eaa0564f3733e9848cddea5f78d9de9496e43919..32e902a387ccd144e977196f375c02aaaa12a8a5 100644
--- a/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.cc
+++ b/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.cc
@@ -1318,6 +1318,19 @@ void BluetoothLowEnergyEventRouter::OnConnectError(
error_status = kStatusErrorTimeout;
} else if (error_code == BluetoothDevice::ERROR_UNSUPPORTED_DEVICE) {
error_status = kStatusErrorUnsupportedDevice;
+ } else if (error_code == BluetoothDevice::ERROR_ATTRIBUTE_LENGTH_INVALID) {
scheib 2015/11/26 00:02:51 This list should be alphabetically sorted too. I'm
Kai Jiang 2015/11/29 10:40:51 Done.
+ error_status = kStatusErrorAttributeLengthInvalid;
+ } else if (error_code == BluetoothDevice::ERROR_CONNECTION_CONGESTED) {
+ error_status = kStatusErrorConnectionCongested;
+ } else if (error_code == BluetoothDevice::ERROR_INSUFFICIENT_ENCRYPTION) {
+ error_status = kStatusErrorInsufficientEncryption;
+ } else if (error_code == BluetoothDevice::ERROR_OFFSET_INVALID) {
+ error_status = kStatusErrorOffsetInvalid;
+ } else if (error_code == BluetoothDevice::ERROR_REQUEST_NOT_SUPPORTED) {
+ error_status = kStatusErrorRequestNotSupported;
+ } else if (error_code == BluetoothDevice::ERROR_WRITE_FAILED ||
+ error_code == BluetoothDevice::ERROR_READ_FAILED) {
+ error_status = kStatusErrorPermissionDenied;
}
// ERROR_UNKNOWN and ERROR_FAILED defaulted to kStatusErrorFailed

Powered by Google App Engine
This is Rietveld 408576698