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 25 matching lines...) Expand all Loading... |
36 | 36 |
37 // There should be a call to this function for every call to the Web Bluetooth | 37 // There should be a call to this function for every call to the Web Bluetooth |
38 // API. | 38 // API. |
39 void RecordWebBluetoothFunctionCall(UMAWebBluetoothFunction function); | 39 void RecordWebBluetoothFunctionCall(UMAWebBluetoothFunction function); |
40 | 40 |
41 // requestDevice() Metrics | 41 // requestDevice() Metrics |
42 enum class UMARequestDeviceOutcome { | 42 enum class UMARequestDeviceOutcome { |
43 SUCCESS = 0, | 43 SUCCESS = 0, |
44 NO_BLUETOOTH_ADAPTER = 1, | 44 NO_BLUETOOTH_ADAPTER = 1, |
45 NO_RENDER_FRAME = 2, | 45 NO_RENDER_FRAME = 2, |
46 DISCOVERY_START_FAILED = 3, | 46 OBSOLETE_DISCOVERY_START_FAILED = 3, |
47 DISCOVERY_STOP_FAILED = 4, | 47 OBSOLETE_DISCOVERY_STOP_FAILED = 4, |
48 NO_MATCHING_DEVICES_FOUND = 5, | 48 OBSOLETE_NO_MATCHING_DEVICES_FOUND = 5, |
49 BLUETOOTH_ADAPTER_NOT_PRESENT = 6, | 49 BLUETOOTH_ADAPTER_NOT_PRESENT = 6, |
50 BLUETOOTH_ADAPTER_OFF = 7, | 50 OBSOLETE_BLUETOOTH_ADAPTER_OFF = 7, |
| 51 NO_BLUETOOTH_CHOOSER_IMPLEMENTATION = 8, |
| 52 CHOSEN_DEVICE_VANISHED = 9, |
| 53 BLUETOOTH_CHOOSER_CANCELLED = 10, |
51 // NOTE: Add new requestDevice() outcomes immediately above this line. Make | 54 // NOTE: Add new requestDevice() outcomes immediately above this line. Make |
52 // sure to update the enum list in | 55 // sure to update the enum list in |
53 // tools/metrics/histograms/histograms.xml accordingly. | 56 // tools/metrics/histograms/histograms.xml accordingly. |
54 COUNT | 57 COUNT |
55 }; | 58 }; |
56 // There should be a call to this function before every | 59 // There should be a call to this function before every |
57 // Send(BluetoothMsg_RequestDeviceSuccess...) or | 60 // Send(BluetoothMsg_RequestDeviceSuccess...) or |
58 // Send(BluetoothMsg_RequestDeviceError...). | 61 // Send(BluetoothMsg_RequestDeviceError...). |
59 void RecordRequestDeviceOutcome(UMARequestDeviceOutcome outcome); | 62 void RecordRequestDeviceOutcome(UMARequestDeviceOutcome outcome); |
60 | 63 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 // Make sure to update the enum list in | 148 // Make sure to update the enum list in |
146 // tools/metrics/histograms/histograms.xml accordingly. | 149 // tools/metrics/histograms/histograms.xml accordingly. |
147 MAX_ERROR, | 150 MAX_ERROR, |
148 }; | 151 }; |
149 // Records the GATT Error the function returned. | 152 // Records the GATT Error the function returned. |
150 void RecordGATTError(UMAGATTError error); | 153 void RecordGATTError(UMAGATTError error); |
151 | 154 |
152 } // namespace content | 155 } // namespace content |
153 | 156 |
154 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_METRICS_H_ | 157 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_METRICS_H_ |
OLD | NEW |