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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 66 OBSOLETE_BLUETOOTH_ADAPTER_OFF = 7, | 66 OBSOLETE_BLUETOOTH_ADAPTER_OFF = 7, |
| 67 CHOSEN_DEVICE_VANISHED = 8, | 67 CHOSEN_DEVICE_VANISHED = 8, |
| 68 BLUETOOTH_CHOOSER_CANCELLED = 9, | 68 BLUETOOTH_CHOOSER_CANCELLED = 9, |
| 69 BLUETOOTH_CHOOSER_DENIED_PERMISSION = 10, | 69 BLUETOOTH_CHOOSER_DENIED_PERMISSION = 10, |
| 70 BLACKLISTED_SERVICE_IN_FILTER = 11, | 70 BLACKLISTED_SERVICE_IN_FILTER = 11, |
| 71 BLUETOOTH_OVERVIEW_HELP_LINK_PRESSED = 12, | 71 BLUETOOTH_OVERVIEW_HELP_LINK_PRESSED = 12, |
| 72 ADAPTER_OFF_HELP_LINK_PRESSED = 13, | 72 ADAPTER_OFF_HELP_LINK_PRESSED = 13, |
| 73 NEED_LOCATION_HELP_LINK_PRESSED = 14, | 73 NEED_LOCATION_HELP_LINK_PRESSED = 14, |
| 74 BLUETOOTH_CHOOSER_POLICY_DISABLED = 15, | 74 BLUETOOTH_CHOOSER_POLICY_DISABLED = 15, |
| 75 BLUETOOTH_GLOBALLY_DISABLED = 16, | 75 BLUETOOTH_GLOBALLY_DISABLED = 16, |
| 76 BLUETOOTH_CHOOSER_EVENT_HANDLER_INVALID = 17, | |
| 76 // NOTE: Add new requestDevice() outcomes immediately above this line. Make | 77 // NOTE: Add new requestDevice() outcomes immediately above this line. Make |
| 77 // sure to update the enum list in | 78 // sure to update the enum list in |
| 78 // tools/metrics/histograms/histograms.xml accordingly. | 79 // tools/metrics/histograms/histograms.xml accordingly. |
| 79 COUNT | 80 COUNT |
| 80 }; | 81 }; |
| 81 | 82 |
| 82 // There should be a call to this function before every | 83 // There should be a call to this function before every |
| 83 // Send(BluetoothMsg_RequestDeviceSuccess...) or | 84 // Send(BluetoothMsg_RequestDeviceSuccess...) or |
| 84 // Send(BluetoothMsg_RequestDeviceError...). | 85 // Send(BluetoothMsg_RequestDeviceError...). |
| 85 void RecordRequestDeviceOutcome(UMARequestDeviceOutcome outcome); | 86 void RecordRequestDeviceOutcome(UMARequestDeviceOutcome outcome); |
|
Jeffrey Yasskin
2016/08/08 16:48:38
You'll have to mark this with CONTENT_EXPORT.
juncai
2016/08/08 18:42:39
Done.
| |
| 86 | 87 |
| 87 // Records stats about the arguments used when calling requestDevice. | 88 // Records stats about the arguments used when calling requestDevice. |
| 88 // - The number of filters used. | 89 // - The number of filters used. |
| 89 // - The size of each filter. | 90 // - The size of each filter. |
| 90 // - UUID of the services used in filters. | 91 // - UUID of the services used in filters. |
| 91 // - Number of optional services used. | 92 // - Number of optional services used. |
| 92 // - UUID of the optional services. | 93 // - UUID of the optional services. |
| 93 // - Size of the union of all services. | 94 // - Size of the union of all services. |
| 94 void RecordRequestDeviceOptions( | 95 void RecordRequestDeviceOptions( |
| 95 const blink::mojom::WebBluetoothRequestDeviceOptionsPtr& options); | 96 const blink::mojom::WebBluetoothRequestDeviceOptionsPtr& options); |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 270 // Send(BluetoothMsg_StopNotificationsError). | 271 // Send(BluetoothMsg_StopNotificationsError). |
| 271 void RecordStartNotificationsOutcome(UMAGATTOperationOutcome outcome); | 272 void RecordStartNotificationsOutcome(UMAGATTOperationOutcome outcome); |
| 272 | 273 |
| 273 // Records the outcome of a cache query for startNotifications. Should only be | 274 // Records the outcome of a cache query for startNotifications. Should only be |
| 274 // called if QueryCacheForCharacteristic fails. | 275 // called if QueryCacheForCharacteristic fails. |
| 275 void RecordStartNotificationsOutcome(CacheQueryOutcome outcome); | 276 void RecordStartNotificationsOutcome(CacheQueryOutcome outcome); |
| 276 | 277 |
| 277 } // namespace content | 278 } // namespace content |
| 278 | 279 |
| 279 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_METRICS_H_ | 280 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_METRICS_H_ |
| OLD | NEW |