| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 NO_BLUETOOTH_ADAPTER = 1, | 59 NO_BLUETOOTH_ADAPTER = 1, |
| 60 NO_RENDER_FRAME = 2, | 60 NO_RENDER_FRAME = 2, |
| 61 OBSOLETE_DISCOVERY_START_FAILED = 3, | 61 OBSOLETE_DISCOVERY_START_FAILED = 3, |
| 62 OBSOLETE_DISCOVERY_STOP_FAILED = 4, | 62 OBSOLETE_DISCOVERY_STOP_FAILED = 4, |
| 63 OBSOLETE_NO_MATCHING_DEVICES_FOUND = 5, | 63 OBSOLETE_NO_MATCHING_DEVICES_FOUND = 5, |
| 64 BLUETOOTH_ADAPTER_NOT_PRESENT = 6, | 64 BLUETOOTH_ADAPTER_NOT_PRESENT = 6, |
| 65 OBSOLETE_BLUETOOTH_ADAPTER_OFF = 7, | 65 OBSOLETE_BLUETOOTH_ADAPTER_OFF = 7, |
| 66 CHOSEN_DEVICE_VANISHED = 8, | 66 CHOSEN_DEVICE_VANISHED = 8, |
| 67 BLUETOOTH_CHOOSER_CANCELLED = 9, | 67 BLUETOOTH_CHOOSER_CANCELLED = 9, |
| 68 BLUETOOTH_CHOOSER_DENIED_PERMISSION = 10, | 68 BLUETOOTH_CHOOSER_DENIED_PERMISSION = 10, |
| 69 BLACKLISTED_SERVICE_IN_FILTER = 11, | 69 BLOCKLISTED_SERVICE_IN_FILTER = 11, |
| 70 BLUETOOTH_OVERVIEW_HELP_LINK_PRESSED = 12, | 70 BLUETOOTH_OVERVIEW_HELP_LINK_PRESSED = 12, |
| 71 ADAPTER_OFF_HELP_LINK_PRESSED = 13, | 71 ADAPTER_OFF_HELP_LINK_PRESSED = 13, |
| 72 NEED_LOCATION_HELP_LINK_PRESSED = 14, | 72 NEED_LOCATION_HELP_LINK_PRESSED = 14, |
| 73 BLUETOOTH_CHOOSER_POLICY_DISABLED = 15, | 73 BLUETOOTH_CHOOSER_POLICY_DISABLED = 15, |
| 74 BLUETOOTH_GLOBALLY_DISABLED = 16, | 74 BLUETOOTH_GLOBALLY_DISABLED = 16, |
| 75 BLUETOOTH_CHOOSER_EVENT_HANDLER_INVALID = 17, | 75 BLUETOOTH_CHOOSER_EVENT_HANDLER_INVALID = 17, |
| 76 BLUETOOTH_LOW_ENERGY_NOT_AVAILABLE = 18, | 76 BLUETOOTH_LOW_ENERGY_NOT_AVAILABLE = 18, |
| 77 BLUETOOTH_CHOOSER_RESCAN = 19, | 77 BLUETOOTH_CHOOSER_RESCAN = 19, |
| 78 // NOTE: Add new requestDevice() outcomes immediately above this line. Make | 78 // NOTE: Add new requestDevice() outcomes immediately above this line. Make |
| 79 // sure to update the enum list in | 79 // sure to update the enum list in |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 blink::mojom::WebBluetoothGATTQueryQuantity quantity, | 171 blink::mojom::WebBluetoothGATTQueryQuantity quantity, |
| 172 const base::Optional<device::BluetoothUUID>& service); | 172 const base::Optional<device::BluetoothUUID>& service); |
| 173 | 173 |
| 174 // getCharacteristic() and getCharacteristics() Metrics | 174 // getCharacteristic() and getCharacteristics() Metrics |
| 175 | 175 |
| 176 enum class UMAGetCharacteristicOutcome { | 176 enum class UMAGetCharacteristicOutcome { |
| 177 SUCCESS = 0, | 177 SUCCESS = 0, |
| 178 NO_DEVICE = 1, | 178 NO_DEVICE = 1, |
| 179 NO_SERVICE = 2, | 179 NO_SERVICE = 2, |
| 180 NOT_FOUND = 3, | 180 NOT_FOUND = 3, |
| 181 BLACKLISTED = 4, | 181 BLOCKLISTED = 4, |
| 182 NO_CHARACTERISTICS = 5, | 182 NO_CHARACTERISTICS = 5, |
| 183 // Note: Add new outcomes immediately above this line. | 183 // Note: Add new outcomes immediately above this line. |
| 184 // Make sure to update the enum list in | 184 // Make sure to update the enum list in |
| 185 // tools/metrisc/histogram/histograms.xml accordingly. | 185 // tools/metrisc/histogram/histograms.xml accordingly. |
| 186 COUNT | 186 COUNT |
| 187 }; | 187 }; |
| 188 | 188 |
| 189 // There should be a call to this function whenever | 189 // There should be a call to this function whenever |
| 190 // RemoteServiceGetCharacteristicsCallback is run. | 190 // RemoteServiceGetCharacteristicsCallback is run. |
| 191 // Pass blink::mojom::WebBluetoothGATTQueryQuantity::SINGLE for | 191 // Pass blink::mojom::WebBluetoothGATTQueryQuantity::SINGLE for |
| (...skipping 26 matching lines...) Expand all Loading... |
| 218 NO_CHARACTERISTIC = 3, | 218 NO_CHARACTERISTIC = 3, |
| 219 NO_DESCRIPTOR = 4, | 219 NO_DESCRIPTOR = 4, |
| 220 UNKNOWN = 5, | 220 UNKNOWN = 5, |
| 221 FAILED = 6, | 221 FAILED = 6, |
| 222 IN_PROGRESS = 7, | 222 IN_PROGRESS = 7, |
| 223 INVALID_LENGTH = 8, | 223 INVALID_LENGTH = 8, |
| 224 NOT_PERMITTED = 9, | 224 NOT_PERMITTED = 9, |
| 225 NOT_AUTHORIZED = 10, | 225 NOT_AUTHORIZED = 10, |
| 226 NOT_PAIRED = 11, | 226 NOT_PAIRED = 11, |
| 227 NOT_SUPPORTED = 12, | 227 NOT_SUPPORTED = 12, |
| 228 BLACKLISTED = 13, | 228 BLOCKLISTED = 13, |
| 229 // Note: Add new GATT Outcomes immediately above this line. | 229 // Note: Add new GATT Outcomes immediately above this line. |
| 230 // Make sure to update the enum list in | 230 // Make sure to update the enum list in |
| 231 // tools/metrics/histograms/histograms.xml accordingly. | 231 // tools/metrics/histograms/histograms.xml accordingly. |
| 232 COUNT | 232 COUNT |
| 233 }; | 233 }; |
| 234 | 234 |
| 235 enum class UMAGATTOperation { | 235 enum class UMAGATTOperation { |
| 236 CHARACTERISTIC_READ, | 236 CHARACTERISTIC_READ, |
| 237 CHARACTERISTIC_WRITE, | 237 CHARACTERISTIC_WRITE, |
| 238 START_NOTIFICATIONS, | 238 START_NOTIFICATIONS, |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 | 290 |
| 291 // Records the raw RSSI, and processed result displayed to users, when | 291 // Records the raw RSSI, and processed result displayed to users, when |
| 292 // content::BluetoothDeviceChooserController::CalculateSignalStrengthLevel() is | 292 // content::BluetoothDeviceChooserController::CalculateSignalStrengthLevel() is |
| 293 // called. | 293 // called. |
| 294 void RecordRSSISignalStrength(int rssi); | 294 void RecordRSSISignalStrength(int rssi); |
| 295 void RecordRSSISignalStrengthLevel(UMARSSISignalStrengthLevel level); | 295 void RecordRSSISignalStrengthLevel(UMARSSISignalStrengthLevel level); |
| 296 | 296 |
| 297 } // namespace content | 297 } // namespace content |
| 298 | 298 |
| 299 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_METRICS_H_ | 299 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_METRICS_H_ |
| OLD | NEW |