Chromium Code Reviews| 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 |