Chromium Code Reviews| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 88 SUCCESS = 0, | 88 SUCCESS = 0, |
| 89 NO_DEVICE = 1, | 89 NO_DEVICE = 1, |
| 90 UNKNOWN = 2, | 90 UNKNOWN = 2, |
| 91 IN_PROGRESS = 3, | 91 IN_PROGRESS = 3, |
| 92 FAILED = 4, | 92 FAILED = 4, |
| 93 AUTH_FAILED = 5, | 93 AUTH_FAILED = 5, |
| 94 AUTH_CANCELED = 6, | 94 AUTH_CANCELED = 6, |
| 95 AUTH_REJECTED = 7, | 95 AUTH_REJECTED = 7, |
| 96 AUTH_TIMEOUT = 8, | 96 AUTH_TIMEOUT = 8, |
| 97 UNSUPPORTED_DEVICE = 9, | 97 UNSUPPORTED_DEVICE = 9, |
| 98 // Note: Add new ConnectGATT outcomes immediately above this line. Make sure | 98 ATTRIBUTE_LENGTH_INVALID = 10, |
| 99 // to update the enum list in tools/metrics/histograms/histograms.xml | 99 CONNECTION_CONGESTED = 11, |
| 100 // accordingly. | 100 INSUFFICIENT_ENCRYPTION = 12, |
| 101 OFFSET_INVALID = 13, | |
| 102 READ_FAILED = 14, | |
| 103 REQUEST_NOT_SUPPORTED = 15, | |
| 104 WRITE_FAILED= 16, | |
| 101 COUNT | 105 COUNT |
|
scheib
2015/11/24 01:30:48
Preserve the comment above COUNT.
Kai Jiang
2015/11/25 14:17:13
Done.
| |
| 102 }; | 106 }; |
| 103 // There should be a call to this function before every | 107 // There should be a call to this function before every |
| 104 // Send(BluetoothMsg_ConnectGATTSuccess) and | 108 // Send(BluetoothMsg_ConnectGATTSuccess) and |
| 105 // Send(BluetoothMsg_ConnectGATTError). | 109 // Send(BluetoothMsg_ConnectGATTError). |
| 106 void RecordConnectGATTOutcome(UMAConnectGATTOutcome outcome); | 110 void RecordConnectGATTOutcome(UMAConnectGATTOutcome outcome); |
| 107 // Records the outcome of the cache query for connectGATT. Should only be called | 111 // Records the outcome of the cache query for connectGATT. Should only be called |
| 108 // if QueryCacheForDevice fails. | 112 // if QueryCacheForDevice fails. |
| 109 void RecordConnectGATTOutcome(CacheQueryOutcome outcome); | 113 void RecordConnectGATTOutcome(CacheQueryOutcome outcome); |
| 110 // Records how long it took for the connection to succeed. | 114 // Records how long it took for the connection to succeed. |
| 111 void RecordConnectGATTTimeSuccess(const base::TimeDelta& duration); | 115 void RecordConnectGATTTimeSuccess(const base::TimeDelta& duration); |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 214 // Send(BluetoothMsg_StartNotificationsSuccess) and | 218 // Send(BluetoothMsg_StartNotificationsSuccess) and |
| 215 // Send(BluetoothMsg_StopNotificationsError). | 219 // Send(BluetoothMsg_StopNotificationsError). |
| 216 void RecordStartNotificationsOutcome(UMAGATTOperationOutcome outcome); | 220 void RecordStartNotificationsOutcome(UMAGATTOperationOutcome outcome); |
| 217 // Records the outcome of a cache query for startNotifications. Should only be | 221 // Records the outcome of a cache query for startNotifications. Should only be |
| 218 // called if QueryCacheForCharacteristic fails. | 222 // called if QueryCacheForCharacteristic fails. |
| 219 void RecordStartNotificationsOutcome(CacheQueryOutcome outcome); | 223 void RecordStartNotificationsOutcome(CacheQueryOutcome outcome); |
| 220 | 224 |
| 221 } // namespace content | 225 } // namespace content |
| 222 | 226 |
| 223 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_METRICS_H_ | 227 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_METRICS_H_ |
| OLD | NEW |