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

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

Issue 2662433003: Add BluetoothRemoteGATTDescriptor reporting for .writeValue(). (Closed)
Patch Set: #3 Created 3 years, 10 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
« no previous file with comments | « no previous file | content/browser/bluetooth/bluetooth_metrics.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 // Records the outcome of a cache query for startNotifications. Should only be 280 // Records the outcome of a cache query for startNotifications. Should only be
281 // called if QueryCacheForCharacteristic fails. 281 // called if QueryCacheForCharacteristic fails.
282 void RecordStartNotificationsOutcome(CacheQueryOutcome outcome); 282 void RecordStartNotificationsOutcome(CacheQueryOutcome outcome);
283 283
284 // Descriptor.readValue() Metrics 284 // Descriptor.readValue() Metrics
285 // There should be a call to this function for every call to 285 // There should be a call to this function for every call to
286 // Send(BluetoothMsg_ReadDescriptorValueSuccess) and 286 // Send(BluetoothMsg_ReadDescriptorValueSuccess) and
287 // Send(BluetoothMsg_ReadDescriptorValueError). 287 // Send(BluetoothMsg_ReadDescriptorValueError).
288 void RecordDescriptorReadValueOutcome(UMAGATTOperationOutcome error); 288 void RecordDescriptorReadValueOutcome(UMAGATTOperationOutcome error);
289 289
290 // Records the outcome of a cache query for writeValue. Should only be called if
ortuno 2017/01/31 23:50:37 You changed the wrong comment hehe. This should be
dougt 2017/01/31 23:54:35 yup. :/
291 // QueryCacheForDescriptor fails.
292 void RecordDescriptorReadValueOutcome(CacheQueryOutcome outcome);
293
294 // Descriptor.writeValue() Metrics
295 // There should be a call to this function for every call to
296 // Send(BluetoothMsg_ReadDescriptorValueSuccess) and
297 // Send(BluetoothMsg_ReadDescriptorValueError).
298 void RecordDescriptorWriteValueOutcome(UMAGATTOperationOutcome error);
299
290 // Records the outcome of a cache query for readValue. Should only be called if 300 // Records the outcome of a cache query for readValue. Should only be called if
291 // QueryCacheForDescriptor fails. 301 // QueryCacheForDescriptor fails.
292 void RecordDescriptorReadValueOutcome(CacheQueryOutcome outcome); 302 void RecordDescriptorWriteValueOutcome(CacheQueryOutcome outcome);
293 303
294 enum class UMARSSISignalStrengthLevel { 304 enum class UMARSSISignalStrengthLevel {
295 LESS_THAN_OR_EQUAL_TO_MIN_RSSI, 305 LESS_THAN_OR_EQUAL_TO_MIN_RSSI,
296 LEVEL_0, 306 LEVEL_0,
297 LEVEL_1, 307 LEVEL_1,
298 LEVEL_2, 308 LEVEL_2,
299 LEVEL_3, 309 LEVEL_3,
300 LEVEL_4, 310 LEVEL_4,
301 GREATER_THAN_OR_EQUAL_TO_MAX_RSSI, 311 GREATER_THAN_OR_EQUAL_TO_MAX_RSSI,
302 // Note: Add new RSSI signal strength level immediately above this line. 312 // Note: Add new RSSI signal strength level immediately above this line.
303 COUNT 313 COUNT
304 }; 314 };
305 315
306 // Records the raw RSSI, and processed result displayed to users, when 316 // Records the raw RSSI, and processed result displayed to users, when
307 // content::BluetoothDeviceChooserController::CalculateSignalStrengthLevel() is 317 // content::BluetoothDeviceChooserController::CalculateSignalStrengthLevel() is
308 // called. 318 // called.
309 void RecordRSSISignalStrength(int rssi); 319 void RecordRSSISignalStrength(int rssi);
310 void RecordRSSISignalStrengthLevel(UMARSSISignalStrengthLevel level); 320 void RecordRSSISignalStrengthLevel(UMARSSISignalStrengthLevel level);
311 321
312 // In the case of not accepting all devices in the options that are given 322 // In the case of not accepting all devices in the options that are given
313 // to WebBluetooth requestDevice(), records the number of devices in the 323 // to WebBluetooth requestDevice(), records the number of devices in the
314 // chooser when a device is paired. 324 // chooser when a device is paired.
315 void RecordNumOfDevices(bool accept_all_devices, size_t num_of_devices); 325 void RecordNumOfDevices(bool accept_all_devices, size_t num_of_devices);
316 326
317 } // namespace content 327 } // namespace content
318 328
319 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_METRICS_H_ 329 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_METRICS_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/bluetooth/bluetooth_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698