| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 // API. | 44 // API. |
| 45 void RecordWebBluetoothFunctionCall(UMAWebBluetoothFunction function); | 45 void RecordWebBluetoothFunctionCall(UMAWebBluetoothFunction function); |
| 46 | 46 |
| 47 // Enumeration for outcomes of querying the bluetooth cache. | 47 // Enumeration for outcomes of querying the bluetooth cache. |
| 48 enum class CacheQueryOutcome { | 48 enum class CacheQueryOutcome { |
| 49 SUCCESS = 0, | 49 SUCCESS = 0, |
| 50 BAD_RENDERER = 1, | 50 BAD_RENDERER = 1, |
| 51 NO_DEVICE = 2, | 51 NO_DEVICE = 2, |
| 52 NO_SERVICE = 3, | 52 NO_SERVICE = 3, |
| 53 NO_CHARACTERISTIC = 4, | 53 NO_CHARACTERISTIC = 4, |
| 54 NO_DESCRIPTOR = 5, |
| 54 }; | 55 }; |
| 55 | 56 |
| 56 // requestDevice() Metrics | 57 // requestDevice() Metrics |
| 57 enum class UMARequestDeviceOutcome { | 58 enum class UMARequestDeviceOutcome { |
| 58 SUCCESS = 0, | 59 SUCCESS = 0, |
| 59 NO_BLUETOOTH_ADAPTER = 1, | 60 NO_BLUETOOTH_ADAPTER = 1, |
| 60 NO_RENDER_FRAME = 2, | 61 NO_RENDER_FRAME = 2, |
| 61 OBSOLETE_DISCOVERY_START_FAILED = 3, | 62 OBSOLETE_DISCOVERY_START_FAILED = 3, |
| 62 OBSOLETE_DISCOVERY_STOP_FAILED = 4, | 63 OBSOLETE_DISCOVERY_STOP_FAILED = 4, |
| 63 OBSOLETE_NO_MATCHING_DEVICES_FOUND = 5, | 64 OBSOLETE_NO_MATCHING_DEVICES_FOUND = 5, |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 // Note: Add new GATT Outcomes immediately above this line. | 229 // Note: Add new GATT Outcomes immediately above this line. |
| 229 // Make sure to update the enum list in | 230 // Make sure to update the enum list in |
| 230 // tools/metrics/histograms/histograms.xml accordingly. | 231 // tools/metrics/histograms/histograms.xml accordingly. |
| 231 COUNT | 232 COUNT |
| 232 }; | 233 }; |
| 233 | 234 |
| 234 enum class UMAGATTOperation { | 235 enum class UMAGATTOperation { |
| 235 CHARACTERISTIC_READ, | 236 CHARACTERISTIC_READ, |
| 236 CHARACTERISTIC_WRITE, | 237 CHARACTERISTIC_WRITE, |
| 237 START_NOTIFICATIONS, | 238 START_NOTIFICATIONS, |
| 239 DESCRIPTOR_READ, |
| 240 DESCRIPTOR_WRITE, |
| 238 // Note: Add new GATT Operations immediately above this line. | 241 // Note: Add new GATT Operations immediately above this line. |
| 239 COUNT | 242 COUNT |
| 240 }; | 243 }; |
| 241 | 244 |
| 242 // Records the outcome of a GATT operation. | 245 // Records the outcome of a GATT operation. |
| 243 // There should be a call to this function whenever the corresponding operation | 246 // There should be a call to this function whenever the corresponding operation |
| 244 // doesn't have a call to Record[Operation]Outcome. | 247 // doesn't have a call to Record[Operation]Outcome. |
| 245 void RecordGATTOperationOutcome(UMAGATTOperation operation, | 248 void RecordGATTOperationOutcome(UMAGATTOperation operation, |
| 246 UMAGATTOperationOutcome outcome); | 249 UMAGATTOperationOutcome outcome); |
| 247 | 250 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 | 292 |
| 290 // Records the raw RSSI, and processed result displayed to users, when | 293 // Records the raw RSSI, and processed result displayed to users, when |
| 291 // content::BluetoothDeviceChooserController::CalculateSignalStrengthLevel() is | 294 // content::BluetoothDeviceChooserController::CalculateSignalStrengthLevel() is |
| 292 // called. | 295 // called. |
| 293 void RecordRSSISignalStrength(int rssi); | 296 void RecordRSSISignalStrength(int rssi); |
| 294 void RecordRSSISignalStrengthLevel(UMARSSISignalStrengthLevel level); | 297 void RecordRSSISignalStrengthLevel(UMARSSISignalStrengthLevel level); |
| 295 | 298 |
| 296 } // namespace content | 299 } // namespace content |
| 297 | 300 |
| 298 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_METRICS_H_ | 301 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_METRICS_H_ |
| OLD | NEW |