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

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

Issue 2641173009: Add BluetoothRemoteGATTDescriptor reporting for .readValue(). (Closed)
Patch Set: Created 3 years, 11 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.cc
diff --git a/content/browser/bluetooth/bluetooth_metrics.cc b/content/browser/bluetooth/bluetooth_metrics.cc
index d33f130d0eca3f877c96cf3ae6d7b25856b94fc6..84421ee5778053c7f19c64baa74b14f077ea4a82 100644
--- a/content/browser/bluetooth/bluetooth_metrics.cc
+++ b/content/browser/bluetooth/bluetooth_metrics.cc
@@ -281,7 +281,7 @@ void RecordGATTOperationOutcome(UMAGATTOperation operation,
RecordStartNotificationsOutcome(outcome);
return;
case UMAGATTOperation::DESCRIPTOR_READ:
- // TODO(667319) Add reporting to descriptors
+ RecordDescriptorReadValueOutcome(outcome);
return;
case UMAGATTOperation::COUNT:
NOTREACHED();
@@ -313,7 +313,6 @@ static UMAGATTOperationOutcome TranslateCacheQueryOutcomeToGATTOperationOutcome(
// Characteristic.readValue
-// static
void RecordCharacteristicReadValueOutcome(UMAGATTOperationOutcome outcome) {
UMA_HISTOGRAM_ENUMERATION("Bluetooth.Web.Characteristic.ReadValue.Outcome",
static_cast<int>(outcome),
@@ -356,6 +355,19 @@ void RecordRSSISignalStrength(int rssi) {
rssi);
}
+// Descriptor.readValue
+
+void RecordDescriptorReadValueOutcome(UMAGATTOperationOutcome outcome) {
+ UMA_HISTOGRAM_ENUMERATION("Bluetooth.Web.Descriptor.ReadValue.Outcome",
+ static_cast<int>(outcome),
+ static_cast<int>(UMAGATTOperationOutcome::COUNT));
+}
+
+void RecordDescriptorReadValueOutcome(CacheQueryOutcome outcome) {
+ RecordDescriptorReadValueOutcome(
+ TranslateCacheQueryOutcomeToGATTOperationOutcome(outcome));
+}
+
void RecordRSSISignalStrengthLevel(UMARSSISignalStrengthLevel level) {
UMA_HISTOGRAM_ENUMERATION(
"Bluetooth.Web.RequestDevice.RSSISignalStrengthLevel",
« no previous file with comments | « content/browser/bluetooth/bluetooth_metrics.h ('k') | content/browser/bluetooth/web_bluetooth_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698