| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 // Send(BluetoothMsg_RequestDeviceError...). | 82 // Send(BluetoothMsg_RequestDeviceError...). |
| 83 void RecordRequestDeviceOutcome(UMARequestDeviceOutcome outcome); | 83 void RecordRequestDeviceOutcome(UMARequestDeviceOutcome outcome); |
| 84 | 84 |
| 85 // Records stats about the arguments used when calling requestDevice. | 85 // Records stats about the arguments used when calling requestDevice. |
| 86 // - The number of filters used. | 86 // - The number of filters used. |
| 87 // - The size of each filter. | 87 // - The size of each filter. |
| 88 // - UUID of the services used in filters. | 88 // - UUID of the services used in filters. |
| 89 // - Number of optional services used. | 89 // - Number of optional services used. |
| 90 // - UUID of the optional services. | 90 // - UUID of the optional services. |
| 91 // - Size of the union of all services. | 91 // - Size of the union of all services. |
| 92 void RecordRequestDeviceArguments( | 92 void RecordRequestDeviceOptions( |
| 93 const std::vector<content::BluetoothScanFilter>& filters, | 93 const blink::mojom::WebBluetoothRequestDeviceOptionsPtr& options); |
| 94 const std::vector<device::BluetoothUUID>& optional_services); | |
| 95 | 94 |
| 96 // connectGATT() Metrics | 95 // connectGATT() Metrics |
| 97 enum class UMAConnectGATTOutcome { | 96 enum class UMAConnectGATTOutcome { |
| 98 SUCCESS = 0, | 97 SUCCESS = 0, |
| 99 NO_DEVICE = 1, | 98 NO_DEVICE = 1, |
| 100 UNKNOWN = 2, | 99 UNKNOWN = 2, |
| 101 IN_PROGRESS = 3, | 100 IN_PROGRESS = 3, |
| 102 FAILED = 4, | 101 FAILED = 4, |
| 103 AUTH_FAILED = 5, | 102 AUTH_FAILED = 5, |
| 104 AUTH_CANCELED = 6, | 103 AUTH_CANCELED = 6, |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 // Send(BluetoothMsg_StartNotificationsSuccess) and | 243 // Send(BluetoothMsg_StartNotificationsSuccess) and |
| 245 // Send(BluetoothMsg_StopNotificationsError). | 244 // Send(BluetoothMsg_StopNotificationsError). |
| 246 void RecordStartNotificationsOutcome(UMAGATTOperationOutcome outcome); | 245 void RecordStartNotificationsOutcome(UMAGATTOperationOutcome outcome); |
| 247 // Records the outcome of a cache query for startNotifications. Should only be | 246 // Records the outcome of a cache query for startNotifications. Should only be |
| 248 // called if QueryCacheForCharacteristic fails. | 247 // called if QueryCacheForCharacteristic fails. |
| 249 void RecordStartNotificationsOutcome(CacheQueryOutcome outcome); | 248 void RecordStartNotificationsOutcome(CacheQueryOutcome outcome); |
| 250 | 249 |
| 251 } // namespace content | 250 } // namespace content |
| 252 | 251 |
| 253 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_METRICS_H_ | 252 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_METRICS_H_ |
| OLD | NEW |