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

Unified Diff: content/browser/bluetooth/bluetooth_metrics.h

Issue 1286883002: bluetooth: Add histograms and logging for getCharacteristic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-uma-refactoring
Patch Set: Merge with ToT Created 5 years, 4 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: content/browser/bluetooth/bluetooth_metrics.h
diff --git a/content/browser/bluetooth/bluetooth_metrics.h b/content/browser/bluetooth/bluetooth_metrics.h
index 88f0feaa1ae377a0321bb8d3a0323bc44dfce654..581cea4aa1df06b8f08f806893a83539d3f8543d 100644
--- a/content/browser/bluetooth/bluetooth_metrics.h
+++ b/content/browser/bluetooth/bluetooth_metrics.h
@@ -97,6 +97,22 @@ class BluetoothMetrics {
static void RecordGetPrimaryServiceOutcome(
UMAGetPrimaryServiceOutcome outcome);
+ // getCharacteristic()
+ 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
+ };
+ static void RecordGetCharacteristicOutcome(
+ UMAGetCharacteristicOutcome outcome);
+ static void RecordGetCharacteristicCharacteristic(
+ const std::string& characteristic);
+
// read/write characteristics
// 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.

Powered by Google App Engine
This is Rietveld 408576698