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

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: Fix Typoe 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 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.
« no previous file with comments | « content/browser/bluetooth/bluetooth_dispatcher_host.cc ('k') | content/browser/bluetooth/bluetooth_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698