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

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

Issue 2662433003: Add BluetoothRemoteGATTDescriptor reporting for .writeValue(). (Closed)
Patch Set: updating comments 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 8cbd38d0da81034d2283504bb0e50560d8f0238b..d9ae54fb1e2d656fc417fd78a4d1df114bbbc8e1 100644
--- a/content/browser/bluetooth/bluetooth_metrics.cc
+++ b/content/browser/bluetooth/bluetooth_metrics.cc
@@ -284,7 +284,7 @@ void RecordGATTOperationOutcome(UMAGATTOperation operation,
RecordDescriptorReadValueOutcome(outcome);
return;
case UMAGATTOperation::DESCRIPTOR_WRITE:
- // TODO(683477) reporting for .writeValue()
+ RecordDescriptorWriteValueOutcome(outcome);
return;
case UMAGATTOperation::COUNT:
NOTREACHED();
@@ -371,6 +371,19 @@ void RecordDescriptorReadValueOutcome(CacheQueryOutcome outcome) {
TranslateCacheQueryOutcomeToGATTOperationOutcome(outcome));
}
+// Descriptor.writeValue
+
+void RecordDescriptorWriteValueOutcome(UMAGATTOperationOutcome outcome) {
+ UMA_HISTOGRAM_ENUMERATION("Bluetooth.Web.Descriptor.WriteValue.Outcome",
+ static_cast<int>(outcome),
+ static_cast<int>(UMAGATTOperationOutcome::COUNT));
+}
+
+void RecordDescriptorWriteValueOutcome(CacheQueryOutcome outcome) {
+ RecordDescriptorWriteValueOutcome(
+ 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