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

Unified Diff: device/bluetooth/bluetooth_low_energy_device_mac.mm

Issue 2912633002: bluetooth: macOS: Adding histograms for NSError values (Closed)
Patch Set: . Created 3 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: device/bluetooth/bluetooth_low_energy_device_mac.mm
diff --git a/device/bluetooth/bluetooth_low_energy_device_mac.mm b/device/bluetooth/bluetooth_low_energy_device_mac.mm
index 41dcd06bdf94758afbbda13cea215b58c3984104..187f3c91c079b8f9686109e8c937e5fce13b27a0 100644
--- a/device/bluetooth/bluetooth_low_energy_device_mac.mm
+++ b/device/bluetooth/bluetooth_low_energy_device_mac.mm
@@ -14,6 +14,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/sys_string_conversions.h"
#include "device/bluetooth/bluetooth_adapter_mac.h"
+#include "device/bluetooth/bluetooth_adapter_mac_metrics.h"
#include "device/bluetooth/bluetooth_device.h"
#include "device/bluetooth/bluetooth_low_energy_peripheral_delegate.h"
#include "device/bluetooth/bluetooth_remote_gatt_characteristic_mac.h"
@@ -222,6 +223,7 @@ void BluetoothLowEnergyDeviceMac::DidDiscoverPrimaryServices(NSError* error) {
discovery_pending_count_ = 0;
return;
}
+ RecordDidDiscoverPrimaryServicesResult(error);
if (error) {
// TODO(http://crbug.com/609320): Need to pass the error.
// TODO(http://crbug.com/609844): Decide what to do if discover failed
@@ -268,6 +270,7 @@ void BluetoothLowEnergyDeviceMac::DidDiscoverPrimaryServices(NSError* error) {
void BluetoothLowEnergyDeviceMac::DidDiscoverCharacteristics(
CBService* cb_service,
NSError* error) {
+ RecordDidDiscoverCharacteristicsResult(error);
if (error) {
// TODO(http://crbug.com/609320): Need to pass the error.
// TODO(http://crbug.com/609844): Decide what to do if discover failed
@@ -347,6 +350,7 @@ void BluetoothLowEnergyDeviceMac::DidUpdateNotificationState(
void BluetoothLowEnergyDeviceMac::DidDiscoverDescriptors(
CBCharacteristic* cb_characteristic,
NSError* error) {
+ RecordDidDiscoverDescriptorsResult(error);
if (error) {
// TODO(http://crbug.com/609320): Need to pass the error.
// TODO(http://crbug.com/609844): Decide what to do if discover failed
@@ -502,6 +506,7 @@ BluetoothLowEnergyDeviceMac::GetBluetoothRemoteGattDescriptorMac(
void BluetoothLowEnergyDeviceMac::DidDisconnectPeripheral(NSError* error) {
connected_ = false;
VLOG(1) << *this << ": Disconnected from peripheral.";
+ RecordDidDisconnectPeripheralResult(error);
if (error) {
VLOG(1) << *this
<< ": Bluetooth error: " << BluetoothAdapterMac::String(error);
« no previous file with comments | « device/bluetooth/bluetooth_adapter_mac_metrics.mm ('k') | device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698