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

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

Issue 1861013005: bluetooth: Move GetCharacteristic(s) over to Mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-separate-tests-read-value
Patch Set: Address palmer's comments Created 4 years, 8 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 872008b851397bf21029807e29e90dfb8d627727..af5ad350f224e3524e6a9a8421750800775a4bec 100644
--- a/content/browser/bluetooth/bluetooth_metrics.h
+++ b/content/browser/bluetooth/bluetooth_metrics.h
@@ -8,6 +8,8 @@
#include <string>
#include <vector>
+#include "third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom.h"
+
namespace base {
class TimeDelta;
}
@@ -26,7 +28,7 @@ enum class UMAWebBluetoothFunction {
REQUEST_DEVICE = 0,
CONNECT_GATT = 1,
GET_PRIMARY_SERVICE = 2,
- GET_CHARACTERISTIC = 3,
+ SERVICE_GET_CHARACTERISTIC = 3,
CHARACTERISTIC_READ_VALUE = 4,
CHARACTERISTIC_WRITE_VALUE = 5,
CHARACTERISTIC_START_NOTIFICATIONS = 6,
@@ -147,7 +149,7 @@ void RecordGetPrimaryServiceOutcome(UMAGetPrimaryServiceOutcome outcome);
// called if QueryCacheForDevice fails.
void RecordGetPrimaryServiceOutcome(CacheQueryOutcome outcome);
-// getCharacteristic() Metrics
+// getCharacteristic() and getCharacteristics() Metrics
enum class UMAGetCharacteristicOutcome {
SUCCESS = 0,
NO_DEVICE = 1,
@@ -160,26 +162,25 @@ enum class UMAGetCharacteristicOutcome {
// 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 outcome of the cache query for getCharacteristic. Should only be
-// called if QueryCacheForService fails.
-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);
+// There should be a call to this function whenever
+// RemoteServiceGetCharacteristicsCallback is run.
+// Pass blink::mojom::WebBluetoothGATTQueryQuantity::SINGLE for
+// getCharacteristic.
+// Pass blink::mojom::WebBluetoothGATTQueryQuantity::MULTIPLE for
+// getCharacteristics.
+void RecordGetCharacteristicsOutcome(
+ blink::mojom::WebBluetoothGATTQueryQuantity quantity,
+ UMAGetCharacteristicOutcome outcome);
// Records the outcome of the cache query for getCharacteristics. Should only be
// called if QueryCacheForService fails.
-void RecordGetCharacteristicsOutcome(CacheQueryOutcome outcome);
+void RecordGetCharacteristicsOutcome(
+ blink::mojom::WebBluetoothGATTQueryQuantity quantity,
+ CacheQueryOutcome outcome);
// Records the UUID of the characteristic used when calling getCharacteristic.
-void RecordGetCharacteristicsCharacteristic(const std::string& characteristic);
+void RecordGetCharacteristicsCharacteristic(
+ blink::mojom::WebBluetoothGATTQueryQuantity quantity,
+ const std::string& characteristic);
// GATT Operations Metrics
« 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