Index: content/browser/bluetooth/bluetooth_metrics.h |
diff --git a/content/browser/bluetooth/bluetooth_metrics.h b/content/browser/bluetooth/bluetooth_metrics.h |
index 3483d4c34fac3852498767ceefe3d8a81ae63152..e3dc24d22408a8fd73b592faabaee1d27ac4f0cc 100644 |
--- a/content/browser/bluetooth/bluetooth_metrics.h |
+++ b/content/browser/bluetooth/bluetooth_metrics.h |
@@ -5,6 +5,7 @@ |
#ifndef CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_METRICS_H_ |
#define CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_METRICS_H_ |
+#include <string> |
#include <vector> |
namespace base { |
@@ -111,6 +112,24 @@ void RecordGetPrimaryServiceService(const device::BluetoothUUID& service); |
// Send(BluetoothMsg_GetPrimaryServiceError). |
void RecordGetPrimaryServiceOutcome(UMAGetPrimaryServiceOutcome outcome); |
+// getCharacteristic() Metrics |
+enum class UMAGetCharacteristicOutcome { |
+ SUCCESS = 0, |
+ NO_DEVICE = 1, |
+ NO_SERVICE = 2, |
+ NOT_FOUND = 3, |
+ // Note: Add new outcomes immediately above this line. |
+ // Make sure to update the enum list in |
+ // tools/metrisc/histogram/histograms.xml accordingly. |
+ COUNT |
+}; |
+// There should be a call to this function for every call to |
+// Send(BluetoothMsg_GetCharacteristicSuccess) and |
+// Send(BluetoothMsg_GetCharacteristicError). |
+void RecordGetCharacteristicOutcome(UMAGetCharacteristicOutcome outcome); |
+// Records the UUID of the characteristic used when calling getCharacteristic. |
+void RecordGetCharacteristicCharacteristic(const std::string& characteristic); |
+ |
// read/write characteristics Metrics |
// TODO(ortuno): For now we are just copying over the code to record these |
// errors but a follow up CL will add a function for each operation. |