Chromium Code Reviews| Index: content/browser/bluetooth/bluetooth_metrics.cc |
| diff --git a/content/browser/bluetooth/bluetooth_metrics.cc b/content/browser/bluetooth/bluetooth_metrics.cc |
| index 13070bd3b5524862e0f6c8de5f212b86ee6dbc64..bc844574a24263d247d4c5934eca314d85f13e39 100644 |
| --- a/content/browser/bluetooth/bluetooth_metrics.cc |
| +++ b/content/browser/bluetooth/bluetooth_metrics.cc |
| @@ -169,6 +169,37 @@ void RecordGetCharacteristicCharacteristic(const std::string& characteristic) { |
| HashUUID(characteristic)); |
| } |
| +// getCharacteristics |
| + |
| +void RecordGetCharacteristicsOutcome(UMAGetCharacteristicOutcome outcome) { |
| + UMA_HISTOGRAM_ENUMERATION( |
| + "Bluetooth.Web.GetCharacteristics.Outcome", static_cast<int>(outcome), |
| + static_cast<int>(UMAGetCharacteristicOutcome::COUNT)); |
| +} |
| + |
| +void RecordGetCharacteristicsOutcome(CacheQueryOutcome outcome) { |
| + switch (outcome) { |
| + case CacheQueryOutcome::SUCCESS: |
| + case CacheQueryOutcome::BAD_RENDERER: |
| + NOTREACHED() << "No need to record a success or renderer crash"; |
|
Ilya Sherman
2016/02/26 01:16:27
nit: Could this text be moved into a comment, rath
ortuno
2016/02/26 16:24:58
Done. Fixed other instances as well.
|
| + return; |
| + case CacheQueryOutcome::NO_DEVICE: |
| + RecordGetCharacteristicsOutcome(UMAGetCharacteristicOutcome::NO_DEVICE); |
| + return; |
| + case CacheQueryOutcome::NO_SERVICE: |
| + RecordGetCharacteristicsOutcome(UMAGetCharacteristicOutcome::NO_SERVICE); |
| + return; |
| + case CacheQueryOutcome::NO_CHARACTERISTIC: |
| + NOTREACHED(); |
| + return; |
| + } |
| +} |
| + |
| +void RecordGetCharacteristicsCharacteristic(const std::string& characteristic) { |
| + UMA_HISTOGRAM_SPARSE_SLOWLY("Bluetooth.Web.GetCharacteristics.Characteristic", |
| + HashUUID(characteristic)); |
|
Ilya Sherman
2016/02/26 01:16:27
Just to confirm: Are you reasonably sure that the
ortuno
2016/02/26 16:24:58
What's the reason for this? I checked the histogra
Jeffrey Yasskin
2016/02/26 16:42:06
The set of characteristics could be large; a coupl
Ilya Sherman
2016/02/26 18:00:24
On the server-side processing backend, we aggregat
|
| +} |
| + |
| // GATT Operations |
| void RecordGATTOperationOutcome(UMAGATTOperation operation, |