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

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

Issue 2667053002: Add RemoteGATTDescriptor to WebBluetoothFunction histogram enum. (Closed)
Patch Set: Missing return stmt. Created 3 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
« no previous file with comments | « no previous file | content/browser/bluetooth/bluetooth_metrics.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/bluetooth/bluetooth_metrics.h
diff --git a/content/browser/bluetooth/bluetooth_metrics.h b/content/browser/bluetooth/bluetooth_metrics.h
index 64c10887ea6e21d78d721d05d847507affa8f970..871722a5bea6150d3de9b761c6eb2b04bca2c7e0 100644
--- a/content/browser/bluetooth/bluetooth_metrics.h
+++ b/content/browser/bluetooth/bluetooth_metrics.h
@@ -37,6 +37,8 @@ enum class UMAWebBluetoothFunction {
GET_PRIMARY_SERVICES = 10,
DESCRIPTOR_READ_VALUE = 11,
DESCRIPTOR_WRITE_VALUE = 12,
+ CHARACTERISTIC_GET_DESCRIPTOR = 13,
+ CHARACTERISTIC_GET_DESCRIPTORS = 14,
// NOTE: Add new actions immediately above this line. Make sure to update
// the enum list in tools/metrics/histograms/histograms.xml accordingly.
COUNT
@@ -185,7 +187,21 @@ enum class UMAGetCharacteristicOutcome {
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.
+ // tools/metrics/histogram/histograms.xml accordingly.
+ COUNT
+};
+
+enum class UMAGetDescriptorOutcome {
+ SUCCESS = 0,
+ NO_DEVICE = 1,
+ NO_SERVICE = 2,
+ NO_CHARACTERISTIC = 3,
+ NOT_FOUND = 4,
+ BLOCKLISTED = 5,
+ NO_DESCRIPTORS = 6,
+ // Note: Add new outcomes immediately above this line.
+ // Make sure to update the enum list in
+ // tools/metrics/histogram/histograms.xml accordingly.
COUNT
};
@@ -210,6 +226,27 @@ void RecordGetCharacteristicsCharacteristic(
blink::mojom::WebBluetoothGATTQueryQuantity quantity,
const base::Optional<device::BluetoothUUID>& characteristic);
+// There should be a call to this function whenever
+// RemoteServiceGetDescriptorsCallback is run.
+// Pass blink::mojom::WebBluetoothGATTQueryQuantity::SINGLE for
+// getDescriptor.
+// Pass blink::mojom::WebBluetoothGATTQueryQuantity::MULTIPLE for
+// getDescriptors.
+void RecordGetDescriptorsOutcome(
+ blink::mojom::WebBluetoothGATTQueryQuantity quantity,
+ UMAGetDescriptorOutcome outcome);
+
+// Records the outcome of the cache query for getDescriptors. Should only be
+// called if QueryCacheForService fails.
+void RecordGetDescriptorsOutcome(
+ blink::mojom::WebBluetoothGATTQueryQuantity quantity,
+ CacheQueryOutcome outcome);
+
+// Records the UUID of the descriptor used when calling getDescriptor.
+void RecordGetDescriptorsDescriptor(
+ blink::mojom::WebBluetoothGATTQueryQuantity quantity,
+ const base::Optional<device::BluetoothUUID>& descriptor);
+
// GATT Operations Metrics
// These are the possible outcomes when performing GATT operations i.e.
« no previous file with comments | « no previous file | content/browser/bluetooth/bluetooth_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698