| Index: chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.cc
|
| diff --git a/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.cc b/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.cc
|
| index 20d3bffdb004469402909d46d21ea0b95b09aea7..2b03d8df2c0886c542b40af30fea903160480ff5 100644
|
| --- a/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.cc
|
| +++ b/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.cc
|
| @@ -39,24 +39,29 @@ const char kErrorAdapterNotInitialized[] =
|
| "Could not initialize Bluetooth adapter";
|
| const char kErrorAlreadyConnected[] = "Already connected";
|
| const char kErrorAlreadyNotifying[] = "Already notifying";
|
| +const char kErrorAttributeLengthInvalid[] = "Attribute length invalid";
|
| const char kErrorAuthenticationFailed[] = "Authentication failed";
|
| const char kErrorCanceled[] = "Request canceled";
|
| +const char kErrorConnectionCongested[] = "Connection congested";
|
| const char kErrorGattNotSupported[] = "Operation not supported by this service";
|
| const char kErrorHigherSecurity[] = "Higher security needed";
|
| const char kErrorInProgress[] = "In progress";
|
| const char kErrorInsufficientAuthorization[] = "Insufficient authorization";
|
| +const char kErrorInsufficientEncryption[] = "Insufficient encryption";
|
| +const char kErrorInvalidAdvertisementLength[] = "Invalid advertisement length";
|
| const char kErrorInvalidLength[] = "Invalid attribute value length";
|
| const char kErrorNotConnected[] = "Not connected";
|
| const char kErrorNotFound[] = "Instance not found";
|
| const char kErrorNotNotifying[] = "Not notifying";
|
| +const char kErrorOffsetInvalid[] = "Offset invalid";
|
| const char kErrorOperationFailed[] = "Operation failed";
|
| const char kErrorPermissionDenied[] = "Permission denied";
|
| const char kErrorPlatformNotSupported[] =
|
| "This operation is not supported on the current platform";
|
| +const char kErrorRequestNotSupported[] = "Request not supported";
|
| const char kErrorTimeout[] = "Operation timed out";
|
| const char kErrorUnsupportedDevice[] =
|
| "This device is not supported on the current platform";
|
| -const char kErrorInvalidAdvertisementLength[] = "Invalid advertisement length";
|
| const char kStatusAdvertisementAlreadyExists[] =
|
| "An advertisement is already advertising";
|
| const char kStatusAdvertisementDoesNotExist[] =
|
| @@ -67,36 +72,46 @@ const char kStatusAdvertisementDoesNotExist[] =
|
| // passed |BluetoothLowEnergyEventRouter::kStatusSuccess|.
|
| std::string StatusToString(BluetoothLowEnergyEventRouter::Status status) {
|
| switch (status) {
|
| - case BluetoothLowEnergyEventRouter::kStatusErrorPermissionDenied:
|
| - return kErrorPermissionDenied;
|
| - case BluetoothLowEnergyEventRouter::kStatusErrorNotFound:
|
| - return kErrorNotFound;
|
| case BluetoothLowEnergyEventRouter::kStatusErrorAlreadyConnected:
|
| return kErrorAlreadyConnected;
|
| case BluetoothLowEnergyEventRouter::kStatusErrorAlreadyNotifying:
|
| return kErrorAlreadyNotifying;
|
| - case BluetoothLowEnergyEventRouter::kStatusErrorNotConnected:
|
| - return kErrorNotConnected;
|
| - case BluetoothLowEnergyEventRouter::kStatusErrorInsufficientAuthorization:
|
| - return kErrorInsufficientAuthorization;
|
| - case BluetoothLowEnergyEventRouter::kStatusErrorNotNotifying:
|
| - return kErrorNotNotifying;
|
| - case BluetoothLowEnergyEventRouter::kStatusErrorInProgress:
|
| - return kErrorInProgress;
|
| + case BluetoothLowEnergyEventRouter::kStatusErrorAttributeLengthInvalid:
|
| + return kErrorAttributeLengthInvalid;
|
| case BluetoothLowEnergyEventRouter::kStatusErrorAuthenticationFailed:
|
| return kErrorAuthenticationFailed;
|
| - case BluetoothLowEnergyEventRouter::kStatusErrorHigherSecurity:
|
| - return kErrorHigherSecurity;
|
| case BluetoothLowEnergyEventRouter::kStatusErrorCanceled:
|
| return kErrorCanceled;
|
| + case BluetoothLowEnergyEventRouter::kStatusErrorConnectionCongested:
|
| + return kErrorConnectionCongested;
|
| + case BluetoothLowEnergyEventRouter::kStatusErrorGattNotSupported:
|
| + return kErrorGattNotSupported;
|
| + case BluetoothLowEnergyEventRouter::kStatusErrorHigherSecurity:
|
| + return kErrorHigherSecurity;
|
| + case BluetoothLowEnergyEventRouter::kStatusErrorInProgress:
|
| + return kErrorInProgress;
|
| + case BluetoothLowEnergyEventRouter::kStatusErrorInsufficientAuthorization:
|
| + return kErrorInsufficientAuthorization;
|
| + case BluetoothLowEnergyEventRouter::kStatusErrorInsufficientEncryption:
|
| + return kErrorInsufficientEncryption;
|
| + case BluetoothLowEnergyEventRouter::kStatusErrorInvalidLength:
|
| + return kErrorInvalidLength;
|
| + case BluetoothLowEnergyEventRouter::kStatusErrorNotConnected:
|
| + return kErrorNotConnected;
|
| + case BluetoothLowEnergyEventRouter::kStatusErrorNotFound:
|
| + return kErrorNotFound;
|
| + case BluetoothLowEnergyEventRouter::kStatusErrorNotNotifying:
|
| + return kErrorNotNotifying;
|
| + case BluetoothLowEnergyEventRouter::kStatusErrorOffsetInvalid:
|
| + return kErrorOffsetInvalid;
|
| + case BluetoothLowEnergyEventRouter::kStatusErrorPermissionDenied:
|
| + return kErrorPermissionDenied;
|
| + case BluetoothLowEnergyEventRouter::kStatusErrorRequestNotSupported:
|
| + return kErrorRequestNotSupported;
|
| case BluetoothLowEnergyEventRouter::kStatusErrorTimeout:
|
| return kErrorTimeout;
|
| case BluetoothLowEnergyEventRouter::kStatusErrorUnsupportedDevice:
|
| return kErrorUnsupportedDevice;
|
| - case BluetoothLowEnergyEventRouter::kStatusErrorInvalidLength:
|
| - return kErrorInvalidLength;
|
| - case BluetoothLowEnergyEventRouter::kStatusErrorGattNotSupported:
|
| - return kErrorGattNotSupported;
|
| case BluetoothLowEnergyEventRouter::kStatusSuccess:
|
| NOTREACHED();
|
| break;
|
|
|