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 345816706d2f94b76cb9a4db30d703568fe58a11..e04a7cab0ea54ac3730cd60be9c1541c3e148412 100644 |
| --- a/content/browser/bluetooth/bluetooth_metrics.cc |
| +++ b/content/browser/bluetooth/bluetooth_metrics.cc |
| @@ -139,11 +139,39 @@ void RecordGetCharacteristicCharacteristic(const std::string& characteristic) { |
| HashUUID(characteristic)); |
| } |
| -// read/write characteristic |
| +// GATT Operations |
| + |
| +void RecordGATTOperationOutcome(UMAGATTOperation operation, |
| + UMAGATTOperationOutcome outcome) { |
| + switch (operation) { |
| + case UMAGATTOperation::CHARACTERISTIC_READ: |
| + RecordCharacteristicReadValueOutcome(outcome); |
| + return; |
| + case UMAGATTOperation::CHARACTERISTIC_WRITE: |
| + RecordCharacteristicWriteValueOutcome(outcome); |
| + return; |
| + case UMAGATTOperation::COUNT: |
| + NOTREACHED(); |
| + return; |
| + } |
| + NOTREACHED(); |
| +} |
| + |
| +// Characteristic.readValue |
| + |
| +// static |
| +void RecordCharacteristicReadValueOutcome(UMAGATTOperationOutcome outcome) { |
| + UMA_HISTOGRAM_ENUMERATION("Bluetooth.Web.Characteristic.ReadValue.Outcome", |
| + static_cast<int>(outcome), |
| + static_cast<int>(UMAGATTOperationOutcome::COUNT)); |
| +} |
| -void RecordGATTError(UMAGATTError error) { |
| - UMA_HISTOGRAM_ENUMERATION("Bluetooth.GATTErrors", static_cast<int>(error), |
|
Jeffrey Yasskin
2015/08/14 21:33:22
Mark this histogram as deprecated.
ortuno
2015/08/14 21:42:20
Done.
|
| - static_cast<int>(UMAGATTError::MAX_ERROR)); |
| +// Characteristic.writeValue |
| + |
| +void RecordCharacteristicWriteValueOutcome(UMAGATTOperationOutcome outcome) { |
| + UMA_HISTOGRAM_ENUMERATION("Bluetooth.Web.Characteristic.WriteValue.Outcome", |
| + static_cast<int>(outcome), |
| + static_cast<int>(UMAGATTOperationOutcome::COUNT)); |
| } |
| } // namespace content |