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, | |
ortuno
2016/12/02 06:14:49
nit: Changes in this file are no longer relevant t
dougt
2016/12/02 18:31:27
Done.
| |
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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
229 // Note: Add new GATT Outcomes immediately above this line. | 230 // Note: Add new GATT Outcomes immediately above this line. |
230 // Make sure to update the enum list in | 231 // Make sure to update the enum list in |
231 // tools/metrics/histograms/histograms.xml accordingly. | 232 // tools/metrics/histograms/histograms.xml accordingly. |
232 COUNT | 233 COUNT |
233 }; | 234 }; |
234 | 235 |
235 enum class UMAGATTOperation { | 236 enum class UMAGATTOperation { |
236 CHARACTERISTIC_READ, | 237 CHARACTERISTIC_READ, |
237 CHARACTERISTIC_WRITE, | 238 CHARACTERISTIC_WRITE, |
238 START_NOTIFICATIONS, | 239 START_NOTIFICATIONS, |
240 DESCRIPTOR_READ, | |
241 DESCRIPTOR_WRITE, | |
239 // Note: Add new GATT Operations immediately above this line. | 242 // Note: Add new GATT Operations immediately above this line. |
240 COUNT | 243 COUNT |
241 }; | 244 }; |
242 | 245 |
243 // Records the outcome of a GATT operation. | 246 // Records the outcome of a GATT operation. |
244 // There should be a call to this function whenever the corresponding operation | 247 // There should be a call to this function whenever the corresponding operation |
245 // doesn't have a call to Record[Operation]Outcome. | 248 // doesn't have a call to Record[Operation]Outcome. |
246 void RecordGATTOperationOutcome(UMAGATTOperation operation, | 249 void RecordGATTOperationOutcome(UMAGATTOperation operation, |
247 UMAGATTOperationOutcome outcome); | 250 UMAGATTOperationOutcome outcome); |
248 | 251 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
290 | 293 |
291 // Records the raw RSSI, and processed result displayed to users, when | 294 // Records the raw RSSI, and processed result displayed to users, when |
292 // content::BluetoothDeviceChooserController::CalculateSignalStrengthLevel() is | 295 // content::BluetoothDeviceChooserController::CalculateSignalStrengthLevel() is |
293 // called. | 296 // called. |
294 void RecordRSSISignalStrength(int rssi); | 297 void RecordRSSISignalStrength(int rssi); |
295 void RecordRSSISignalStrengthLevel(UMARSSISignalStrengthLevel level); | 298 void RecordRSSISignalStrengthLevel(UMARSSISignalStrengthLevel level); |
296 | 299 |
297 } // namespace content | 300 } // namespace content |
298 | 301 |
299 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_METRICS_H_ | 302 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_METRICS_H_ |
OLD | NEW |