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 #ifndef CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_METRICS_H_ | 5 #ifndef CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_METRICS_H_ |
6 #define CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_METRICS_H_ | 6 #define CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_METRICS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 // Records the outcome of the cache query for getPrimaryService. Should only be | 143 // Records the outcome of the cache query for getPrimaryService. Should only be |
144 // called if QueryCacheForDevice fails. | 144 // called if QueryCacheForDevice fails. |
145 void RecordGetPrimaryServiceOutcome(CacheQueryOutcome outcome); | 145 void RecordGetPrimaryServiceOutcome(CacheQueryOutcome outcome); |
146 | 146 |
147 // getCharacteristic() Metrics | 147 // getCharacteristic() Metrics |
148 enum class UMAGetCharacteristicOutcome { | 148 enum class UMAGetCharacteristicOutcome { |
149 SUCCESS = 0, | 149 SUCCESS = 0, |
150 NO_DEVICE = 1, | 150 NO_DEVICE = 1, |
151 NO_SERVICE = 2, | 151 NO_SERVICE = 2, |
152 NOT_FOUND = 3, | 152 NOT_FOUND = 3, |
| 153 BLACKLISTED = 4, |
153 // Note: Add new outcomes immediately above this line. | 154 // Note: Add new outcomes immediately above this line. |
154 // Make sure to update the enum list in | 155 // Make sure to update the enum list in |
155 // tools/metrisc/histogram/histograms.xml accordingly. | 156 // tools/metrisc/histogram/histograms.xml accordingly. |
156 COUNT | 157 COUNT |
157 }; | 158 }; |
158 // There should be a call to this function for every call to | 159 // There should be a call to this function for every call to |
159 // Send(BluetoothMsg_GetCharacteristicSuccess) and | 160 // Send(BluetoothMsg_GetCharacteristicSuccess) and |
160 // Send(BluetoothMsg_GetCharacteristicError). | 161 // Send(BluetoothMsg_GetCharacteristicError). |
161 void RecordGetCharacteristicOutcome(UMAGetCharacteristicOutcome outcome); | 162 void RecordGetCharacteristicOutcome(UMAGetCharacteristicOutcome outcome); |
162 // Records the outcome of the cache query for getCharacteristic. Should only be | 163 // Records the outcome of the cache query for getCharacteristic. Should only be |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 // Send(BluetoothMsg_StartNotificationsSuccess) and | 227 // Send(BluetoothMsg_StartNotificationsSuccess) and |
227 // Send(BluetoothMsg_StopNotificationsError). | 228 // Send(BluetoothMsg_StopNotificationsError). |
228 void RecordStartNotificationsOutcome(UMAGATTOperationOutcome outcome); | 229 void RecordStartNotificationsOutcome(UMAGATTOperationOutcome outcome); |
229 // Records the outcome of a cache query for startNotifications. Should only be | 230 // Records the outcome of a cache query for startNotifications. Should only be |
230 // called if QueryCacheForCharacteristic fails. | 231 // called if QueryCacheForCharacteristic fails. |
231 void RecordStartNotificationsOutcome(CacheQueryOutcome outcome); | 232 void RecordStartNotificationsOutcome(CacheQueryOutcome outcome); |
232 | 233 |
233 } // namespace content | 234 } // namespace content |
234 | 235 |
235 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_METRICS_H_ | 236 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_METRICS_H_ |
OLD | NEW |