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

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: Merge 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..f294340fb6f42b24b2bcf97deba3a00a3bec2982 100644
--- a/content/browser/bluetooth/bluetooth_metrics.h
+++ b/content/browser/bluetooth/bluetooth_metrics.h
@@ -26,7 +26,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 +147,7 @@ void RecordGetPrimaryServiceOutcome(UMAGetPrimaryServiceOutcome outcome);
// called if QueryCacheForDevice fails.
void RecordGetPrimaryServiceOutcome(CacheQueryOutcome outcome);
-// getCharacteristic() Metrics
+// getCharacteristic() & getCharacteristics() Metrics
Jeffrey Yasskin 2016/04/22 01:16:37 nit: I'd spell out "and" since & is a C++ token.
ortuno 2016/04/25 15:29:45 Done.
enum class UMAGetCharacteristicOutcome {
SUCCESS = 0,
NO_DEVICE = 1,
@@ -160,26 +160,19 @@ 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.
+// |single_characteristic| should be true for getCharacteristic calls.
+void RecordGetCharacteristicsOutcome(bool single_characteristic,
Jeffrey Yasskin 2016/04/22 01:16:37 Prefer enum-classes over boolean arguments unless
ortuno 2016/04/25 15:29:45 Done.
+ UMAGetCharacteristicOutcome outcome);
// Records the outcome of the cache query for getCharacteristics. Should only be
// called if QueryCacheForService fails.
-void RecordGetCharacteristicsOutcome(CacheQueryOutcome outcome);
+void RecordGetCharacteristicsOutcome(bool single_characteristic,
+ CacheQueryOutcome outcome);
// Records the UUID of the characteristic used when calling getCharacteristic.
-void RecordGetCharacteristicsCharacteristic(const std::string& characteristic);
+void RecordGetCharacteristicsCharacteristic(bool single_characteristic,
+ const std::string& characteristic);
// GATT Operations Metrics

Powered by Google App Engine
This is Rietveld 408576698