| 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 | 178 |
| 176 // Characteristic.writeValue() Metrics | 179 // Characteristic.writeValue() Metrics |
| 177 // There should be a call to this function for every call to | 180 // There should be a call to this function for every call to |
| 178 // Send(BluetoothMsg_WriteCharacteristicValueSuccess) and | 181 // Send(BluetoothMsg_WriteCharacteristicValueSuccess) and |
| 179 // Send(BluetoothMsg_WriteCharacteristicValueError). | 182 // Send(BluetoothMsg_WriteCharacteristicValueError). |
| 180 void RecordCharacteristicWriteValueOutcome(UMAGATTOperationOutcome error); | 183 void RecordCharacteristicWriteValueOutcome(UMAGATTOperationOutcome error); |
| 181 | 184 |
| 182 } // namespace content | 185 } // namespace content |
| 183 | 186 |
| 184 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_METRICS_H_ | 187 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_METRICS_H_ |
| OLD | NEW |