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

Unified Diff: extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_api.cc

Issue 628983003: New error strings for chrome.bluetoothLowEnergy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Shortened super-long constant names. Created 6 years, 2 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_low_energy/bluetooth_low_energy_api.cc
diff --git a/extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_api.cc b/extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_api.cc
index 981a8a059c1dfbad1c7e61890a82f0b795d0fea3..17b47d290e5edc8a98114acfd6f58b3c9a854555 100644
--- a/extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_api.cc
+++ b/extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_api.cc
@@ -33,6 +33,13 @@ const char kErrorNotNotifying[] = "Not notifying";
const char kErrorNotFound[] = "Instance not found";
const char kErrorOperationFailed[] = "Operation failed";
const char kErrorPermissionDenied[] = "Permission denied";
+const char kErrorAuthenticationFailed[] = "Authentication failed";
+const char kErrorCanceled[] = "Request canceled";
+const char kErrorTimeout[] = "Operation timed out";
+const char kErrorInvalidLength[] = "Invalid data length";
+const char kErrorGattNotSupported[] = "Operation not supported by this service";
+const char kErrorUnsupportedDevice[] =
+ "This device is not supported on the current platform";
const char kErrorPlatformNotSupported[] =
"This operation is not supported on the current platform";
@@ -55,6 +62,18 @@ std::string StatusToString(BluetoothLowEnergyEventRouter::Status status) {
return kErrorNotNotifying;
case BluetoothLowEnergyEventRouter::kStatusErrorInProgress:
return kErrorInProgress;
+ case BluetoothLowEnergyEventRouter::kStatusErrorAuthenticationFailed:
+ return kErrorAuthenticationFailed;
+ case BluetoothLowEnergyEventRouter::kStatusErrorCanceled:
+ return kErrorCanceled;
+ 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;

Powered by Google App Engine
This is Rietveld 408576698