Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: content/browser/bluetooth/bluetooth_metrics.h

Issue 2015463004: bluetooth: Use BluetoothUUID instead of string when sending uuids (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-mojo-request-device
Patch Set: Fix merge conflict Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 enum class UMAGetPrimaryServiceOutcome { 132 enum class UMAGetPrimaryServiceOutcome {
133 SUCCESS = 0, 133 SUCCESS = 0,
134 NO_DEVICE = 1, 134 NO_DEVICE = 1,
135 NOT_FOUND = 2, 135 NOT_FOUND = 2,
136 // Note: Add new GetPrimaryService outcomes immediately above this line. 136 // Note: Add new GetPrimaryService outcomes immediately above this line.
137 // Make sure to update the enum list in 137 // Make sure to update the enum list in
138 // tools/metrics/histograms/histograms.xml accordingly. 138 // tools/metrics/histograms/histograms.xml accordingly.
139 COUNT 139 COUNT
140 }; 140 };
141 // Record the service uuid used when calling getPrimaryService. 141 // Record the service uuid used when calling getPrimaryService.
142 void RecordGetPrimaryServiceService(const device::BluetoothUUID& service); 142 void RecordGetPrimaryServiceService(
143 const base::Optional<device::BluetoothUUID>& service);
143 // There should be a call to this function for every call to 144 // There should be a call to this function for every call to
144 // Send(BluetoothMsg_GetPrimaryServiceSuccess) and 145 // Send(BluetoothMsg_GetPrimaryServiceSuccess) and
145 // Send(BluetoothMsg_GetPrimaryServiceError). 146 // Send(BluetoothMsg_GetPrimaryServiceError).
146 void RecordGetPrimaryServiceOutcome(UMAGetPrimaryServiceOutcome outcome); 147 void RecordGetPrimaryServiceOutcome(UMAGetPrimaryServiceOutcome outcome);
147 // Records the outcome of the cache query for getPrimaryService. Should only be 148 // Records the outcome of the cache query for getPrimaryService. Should only be
148 // called if QueryCacheForDevice fails. 149 // called if QueryCacheForDevice fails.
149 void RecordGetPrimaryServiceOutcome(CacheQueryOutcome outcome); 150 void RecordGetPrimaryServiceOutcome(CacheQueryOutcome outcome);
150 151
151 // getCharacteristic() and getCharacteristics() Metrics 152 // getCharacteristic() and getCharacteristics() Metrics
152 enum class UMAGetCharacteristicOutcome { 153 enum class UMAGetCharacteristicOutcome {
(...skipping 19 matching lines...) Expand all
172 blink::mojom::WebBluetoothGATTQueryQuantity quantity, 173 blink::mojom::WebBluetoothGATTQueryQuantity quantity,
173 UMAGetCharacteristicOutcome outcome); 174 UMAGetCharacteristicOutcome outcome);
174 // Records the outcome of the cache query for getCharacteristics. Should only be 175 // Records the outcome of the cache query for getCharacteristics. Should only be
175 // called if QueryCacheForService fails. 176 // called if QueryCacheForService fails.
176 void RecordGetCharacteristicsOutcome( 177 void RecordGetCharacteristicsOutcome(
177 blink::mojom::WebBluetoothGATTQueryQuantity quantity, 178 blink::mojom::WebBluetoothGATTQueryQuantity quantity,
178 CacheQueryOutcome outcome); 179 CacheQueryOutcome outcome);
179 // Records the UUID of the characteristic used when calling getCharacteristic. 180 // Records the UUID of the characteristic used when calling getCharacteristic.
180 void RecordGetCharacteristicsCharacteristic( 181 void RecordGetCharacteristicsCharacteristic(
181 blink::mojom::WebBluetoothGATTQueryQuantity quantity, 182 blink::mojom::WebBluetoothGATTQueryQuantity quantity,
182 const std::string& characteristic); 183 const base::Optional<device::BluetoothUUID>& characteristic);
183 184
184 // GATT Operations Metrics 185 // GATT Operations Metrics
185 186
186 // These are the possible outcomes when performing GATT operations i.e. 187 // These are the possible outcomes when performing GATT operations i.e.
187 // characteristic.readValue/writeValue descriptor.readValue/writeValue. 188 // characteristic.readValue/writeValue descriptor.readValue/writeValue.
188 enum UMAGATTOperationOutcome { 189 enum UMAGATTOperationOutcome {
189 SUCCESS = 0, 190 SUCCESS = 0,
190 NO_DEVICE = 1, 191 NO_DEVICE = 1,
191 NO_SERVICE = 2, 192 NO_SERVICE = 2,
192 NO_CHARACTERISTIC = 3, 193 NO_CHARACTERISTIC = 3,
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 // Send(BluetoothMsg_StartNotificationsSuccess) and 244 // Send(BluetoothMsg_StartNotificationsSuccess) and
244 // Send(BluetoothMsg_StopNotificationsError). 245 // Send(BluetoothMsg_StopNotificationsError).
245 void RecordStartNotificationsOutcome(UMAGATTOperationOutcome outcome); 246 void RecordStartNotificationsOutcome(UMAGATTOperationOutcome outcome);
246 // Records the outcome of a cache query for startNotifications. Should only be 247 // Records the outcome of a cache query for startNotifications. Should only be
247 // called if QueryCacheForCharacteristic fails. 248 // called if QueryCacheForCharacteristic fails.
248 void RecordStartNotificationsOutcome(CacheQueryOutcome outcome); 249 void RecordStartNotificationsOutcome(CacheQueryOutcome outcome);
249 250
250 } // namespace content 251 } // namespace content
251 252
252 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_METRICS_H_ 253 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_METRICS_H_
OLDNEW
« no previous file with comments | « content/browser/bluetooth/bluetooth_device_chooser_controller.cc ('k') | content/browser/bluetooth/bluetooth_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698