| 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, | 
|   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, | 
|  239   // Note: Add new GATT Operations immediately above this line. |  241   // Note: Add new GATT Operations immediately above this line. | 
|  240   COUNT |  242   COUNT | 
|  241 }; |  243 }; | 
|  242  |  244  | 
|  243 // Records the outcome of a GATT operation. |  245 // Records the outcome of a GATT operation. | 
|  244 // There should be a call to this function whenever the corresponding operation |  246 // There should be a call to this function whenever the corresponding operation | 
|  245 // doesn't have a call to Record[Operation]Outcome. |  247 // doesn't have a call to Record[Operation]Outcome. | 
|  246 void RecordGATTOperationOutcome(UMAGATTOperation operation, |  248 void RecordGATTOperationOutcome(UMAGATTOperation operation, | 
|  247                                 UMAGATTOperationOutcome outcome); |  249                                 UMAGATTOperationOutcome outcome); | 
|  248  |  250  | 
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  295 void RecordRSSISignalStrengthLevel(UMARSSISignalStrengthLevel level); |  297 void RecordRSSISignalStrengthLevel(UMARSSISignalStrengthLevel level); | 
|  296  |  298  | 
|  297 // In the case of not accepting all devices in the options that are given |  299 // In the case of not accepting all devices in the options that are given | 
|  298 // to WebBluetooth requestDevice(), records the number of devices in the |  300 // to WebBluetooth requestDevice(), records the number of devices in the | 
|  299 // chooser when a device is paired. |  301 // chooser when a device is paired. | 
|  300 void RecordNumOfDevices(bool accept_all_devices, size_t num_of_devices); |  302 void RecordNumOfDevices(bool accept_all_devices, size_t num_of_devices); | 
|  301  |  303  | 
|  302 }  // namespace content |  304 }  // namespace content | 
|  303  |  305  | 
|  304 #endif  // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_METRICS_H_ |  306 #endif  // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_METRICS_H_ | 
| OLD | NEW |