OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/bluetooth/bluetooth_metrics.h" | 5 #include "content/browser/bluetooth/bluetooth_metrics.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 #include "base/hash.h" | 9 #include "base/hash.h" |
10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 UMA_HISTOGRAM_SPARSE_SLOWLY("Bluetooth.Web.GetPrimaryService.Services", | 119 UMA_HISTOGRAM_SPARSE_SLOWLY("Bluetooth.Web.GetPrimaryService.Services", |
120 HashUUID(service.canonical_value())); | 120 HashUUID(service.canonical_value())); |
121 } | 121 } |
122 | 122 |
123 void RecordGetPrimaryServiceOutcome(UMAGetPrimaryServiceOutcome outcome) { | 123 void RecordGetPrimaryServiceOutcome(UMAGetPrimaryServiceOutcome outcome) { |
124 UMA_HISTOGRAM_ENUMERATION( | 124 UMA_HISTOGRAM_ENUMERATION( |
125 "Bluetooth.Web.GetPrimaryService.Outcome", static_cast<int>(outcome), | 125 "Bluetooth.Web.GetPrimaryService.Outcome", static_cast<int>(outcome), |
126 static_cast<int>(UMAGetPrimaryServiceOutcome::COUNT)); | 126 static_cast<int>(UMAGetPrimaryServiceOutcome::COUNT)); |
127 } | 127 } |
128 | 128 |
| 129 // getCharacteristic |
| 130 |
| 131 void RecordGetCharacteristicOutcome(UMAGetCharacteristicOutcome outcome) { |
| 132 UMA_HISTOGRAM_ENUMERATION( |
| 133 "Bluetooth.Web.GetCharacteristic.Outcome", static_cast<int>(outcome), |
| 134 static_cast<int>(UMAGetCharacteristicOutcome::COUNT)); |
| 135 } |
| 136 |
| 137 void RecordGetCharacteristicCharacteristic(const std::string& characteristic) { |
| 138 UMA_HISTOGRAM_SPARSE_SLOWLY("Bluetooth.Web.GetCharacteristic.Characteristic", |
| 139 HashUUID(characteristic)); |
| 140 } |
| 141 |
129 // read/write characteristic | 142 // read/write characteristic |
130 | 143 |
131 void RecordGATTError(UMAGATTError error) { | 144 void RecordGATTError(UMAGATTError error) { |
132 UMA_HISTOGRAM_ENUMERATION("Bluetooth.GATTErrors", static_cast<int>(error), | 145 UMA_HISTOGRAM_ENUMERATION("Bluetooth.GATTErrors", static_cast<int>(error), |
133 static_cast<int>(UMAGATTError::MAX_ERROR)); | 146 static_cast<int>(UMAGATTError::MAX_ERROR)); |
134 } | 147 } |
135 | 148 |
136 } // namespace content | 149 } // namespace content |
OLD | NEW |