| 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 13 matching lines...) Expand all Loading... |
| 24 // Enumaration of each Web Bluetooth API entry point. | 24 // Enumaration of each Web Bluetooth API entry point. |
| 25 enum class UMAWebBluetoothFunction { | 25 enum class UMAWebBluetoothFunction { |
| 26 REQUEST_DEVICE = 0, | 26 REQUEST_DEVICE = 0, |
| 27 CONNECT_GATT = 1, | 27 CONNECT_GATT = 1, |
| 28 GET_PRIMARY_SERVICE = 2, | 28 GET_PRIMARY_SERVICE = 2, |
| 29 GET_CHARACTERISTIC = 3, | 29 GET_CHARACTERISTIC = 3, |
| 30 CHARACTERISTIC_READ_VALUE = 4, | 30 CHARACTERISTIC_READ_VALUE = 4, |
| 31 CHARACTERISTIC_WRITE_VALUE = 5, | 31 CHARACTERISTIC_WRITE_VALUE = 5, |
| 32 CHARACTERISTIC_START_NOTIFICATIONS = 6, | 32 CHARACTERISTIC_START_NOTIFICATIONS = 6, |
| 33 CHARACTERISTIC_STOP_NOTIFICATIONS = 7, | 33 CHARACTERISTIC_STOP_NOTIFICATIONS = 7, |
| 34 REMOTE_GATT_SERVER_DISCONNECT = 8, |
| 34 // NOTE: Add new actions immediately above this line. Make sure to update | 35 // NOTE: Add new actions immediately above this line. Make sure to update |
| 35 // the enum list in tools/metrics/histograms/histograms.xml accordingly. | 36 // the enum list in tools/metrics/histograms/histograms.xml accordingly. |
| 36 COUNT | 37 COUNT |
| 37 }; | 38 }; |
| 38 | 39 |
| 39 // There should be a call to this function for every call to the Web Bluetooth | 40 // There should be a call to this function for every call to the Web Bluetooth |
| 40 // API. | 41 // API. |
| 41 void RecordWebBluetoothFunctionCall(UMAWebBluetoothFunction function); | 42 void RecordWebBluetoothFunctionCall(UMAWebBluetoothFunction function); |
| 42 | 43 |
| 43 // Enumation for outcomes of querying the bluetooth cache. | 44 // Enumation for outcomes of querying the bluetooth cache. |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 // Send(BluetoothMsg_StartNotificationsSuccess) and | 222 // Send(BluetoothMsg_StartNotificationsSuccess) and |
| 222 // Send(BluetoothMsg_StopNotificationsError). | 223 // Send(BluetoothMsg_StopNotificationsError). |
| 223 void RecordStartNotificationsOutcome(UMAGATTOperationOutcome outcome); | 224 void RecordStartNotificationsOutcome(UMAGATTOperationOutcome outcome); |
| 224 // Records the outcome of a cache query for startNotifications. Should only be | 225 // Records the outcome of a cache query for startNotifications. Should only be |
| 225 // called if QueryCacheForCharacteristic fails. | 226 // called if QueryCacheForCharacteristic fails. |
| 226 void RecordStartNotificationsOutcome(CacheQueryOutcome outcome); | 227 void RecordStartNotificationsOutcome(CacheQueryOutcome outcome); |
| 227 | 228 |
| 228 } // namespace content | 229 } // namespace content |
| 229 | 230 |
| 230 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_METRICS_H_ | 231 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_METRICS_H_ |
| OLD | NEW |