| 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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 // Descriptor.readValue() Metrics | 284 // Descriptor.readValue() Metrics |
| 285 // There should be a call to this function for every call to | 285 // There should be a call to this function for every call to |
| 286 // Send(BluetoothMsg_ReadDescriptorValueSuccess) and | 286 // Send(BluetoothMsg_ReadDescriptorValueSuccess) and |
| 287 // Send(BluetoothMsg_ReadDescriptorValueError). | 287 // Send(BluetoothMsg_ReadDescriptorValueError). |
| 288 void RecordDescriptorReadValueOutcome(UMAGATTOperationOutcome error); | 288 void RecordDescriptorReadValueOutcome(UMAGATTOperationOutcome error); |
| 289 | 289 |
| 290 // Records the outcome of a cache query for readValue. Should only be called if | 290 // Records the outcome of a cache query for readValue. Should only be called if |
| 291 // QueryCacheForDescriptor fails. | 291 // QueryCacheForDescriptor fails. |
| 292 void RecordDescriptorReadValueOutcome(CacheQueryOutcome outcome); | 292 void RecordDescriptorReadValueOutcome(CacheQueryOutcome outcome); |
| 293 | 293 |
| 294 // Descriptor.writeValue() Metrics |
| 295 // There should be a call to this function for every call to |
| 296 // Send(BluetoothMsg_ReadDescriptorValueSuccess) and |
| 297 // Send(BluetoothMsg_ReadDescriptorValueError). |
| 298 void RecordDescriptorWriteValueOutcome(UMAGATTOperationOutcome error); |
| 299 |
| 300 // Records the outcome of a cache query for writeValue. Should only be called if |
| 301 // QueryCacheForDescriptor fails. |
| 302 void RecordDescriptorWriteValueOutcome(CacheQueryOutcome outcome); |
| 303 |
| 294 enum class UMARSSISignalStrengthLevel { | 304 enum class UMARSSISignalStrengthLevel { |
| 295 LESS_THAN_OR_EQUAL_TO_MIN_RSSI, | 305 LESS_THAN_OR_EQUAL_TO_MIN_RSSI, |
| 296 LEVEL_0, | 306 LEVEL_0, |
| 297 LEVEL_1, | 307 LEVEL_1, |
| 298 LEVEL_2, | 308 LEVEL_2, |
| 299 LEVEL_3, | 309 LEVEL_3, |
| 300 LEVEL_4, | 310 LEVEL_4, |
| 301 GREATER_THAN_OR_EQUAL_TO_MAX_RSSI, | 311 GREATER_THAN_OR_EQUAL_TO_MAX_RSSI, |
| 302 // Note: Add new RSSI signal strength level immediately above this line. | 312 // Note: Add new RSSI signal strength level immediately above this line. |
| 303 COUNT | 313 COUNT |
| 304 }; | 314 }; |
| 305 | 315 |
| 306 // Records the raw RSSI, and processed result displayed to users, when | 316 // Records the raw RSSI, and processed result displayed to users, when |
| 307 // content::BluetoothDeviceChooserController::CalculateSignalStrengthLevel() is | 317 // content::BluetoothDeviceChooserController::CalculateSignalStrengthLevel() is |
| 308 // called. | 318 // called. |
| 309 void RecordRSSISignalStrength(int rssi); | 319 void RecordRSSISignalStrength(int rssi); |
| 310 void RecordRSSISignalStrengthLevel(UMARSSISignalStrengthLevel level); | 320 void RecordRSSISignalStrengthLevel(UMARSSISignalStrengthLevel level); |
| 311 | 321 |
| 312 // In the case of not accepting all devices in the options that are given | 322 // In the case of not accepting all devices in the options that are given |
| 313 // to WebBluetooth requestDevice(), records the number of devices in the | 323 // to WebBluetooth requestDevice(), records the number of devices in the |
| 314 // chooser when a device is paired. | 324 // chooser when a device is paired. |
| 315 void RecordNumOfDevices(bool accept_all_devices, size_t num_of_devices); | 325 void RecordNumOfDevices(bool accept_all_devices, size_t num_of_devices); |
| 316 | 326 |
| 317 } // namespace content | 327 } // namespace content |
| 318 | 328 |
| 319 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_METRICS_H_ | 329 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_METRICS_H_ |
| OLD | NEW |