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

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

Issue 1723723002: bluetooth: Implement Service.getCharacteristics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Address jyasskin's comments and add moar tests Created 4 years, 10 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 b226a8c3bbfc4984624c7be4e5e99521dc80a127..7edb012aa1d05ec055253ffdee002ec14b68452a 100644
--- a/content/browser/bluetooth/bluetooth_metrics.h
+++ b/content/browser/bluetooth/bluetooth_metrics.h
@@ -32,6 +32,7 @@ enum class UMAWebBluetoothFunction {
CHARACTERISTIC_START_NOTIFICATIONS = 6,
CHARACTERISTIC_STOP_NOTIFICATIONS = 7,
REMOTE_GATT_SERVER_DISCONNECT = 8,
+ SERVICE_GET_CHARACTERISTICS = 9,
// NOTE: Add new actions immediately above this line. Make sure to update
// the enum list in tools/metrics/histograms/histograms.xml accordingly.
COUNT
@@ -151,6 +152,7 @@ enum class UMAGetCharacteristicOutcome {
NO_SERVICE = 2,
NOT_FOUND = 3,
BLACKLISTED = 4,
+ NO_CHARACTERISTICS = 5,
// Note: Add new outcomes immediately above this line.
// Make sure to update the enum list in
// tools/metrisc/histogram/histograms.xml accordingly.
@@ -166,6 +168,17 @@ void RecordGetCharacteristicOutcome(CacheQueryOutcome outcome);
// Records the UUID of the characteristic used when calling getCharacteristic.
void RecordGetCharacteristicCharacteristic(const std::string& characteristic);
+// getCharacteristics() Metrics
+// There should be a call to this function for every call to
+// Send(BluetoothMsg_GetCharacteristicsSuccess) and
+// Send(BluetoothMsg_GetCharacteristicsError).
+void RecordGetCharacteristicsOutcome(UMAGetCharacteristicOutcome outcome);
+// Records the outcome of the cache query for getCharacteristics. Should only be
+// called if QueryCacheForService fails.
+void RecordGetCharacteristicsOutcome(CacheQueryOutcome outcome);
+// Records the UUID of the characteristic used when calling getCharacteristic.
+void RecordGetCharacteristicsCharacteristic(const std::string& characteristic);
+
// GATT Operations Metrics
// These are the possible outcomes when performing GATT operations i.e.

Powered by Google App Engine
This is Rietveld 408576698