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

Unified Diff: device/bluetooth/bluetooth_remote_gatt_descriptor_mac.mm

Issue 2912633002: bluetooth: macOS: Adding histograms for NSError values (Closed)
Patch Set: Created 3 years, 7 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_remote_gatt_descriptor_mac.mm
diff --git a/device/bluetooth/bluetooth_remote_gatt_descriptor_mac.mm b/device/bluetooth/bluetooth_remote_gatt_descriptor_mac.mm
index 173adcdf78963b21e8f1bcdb9989a65764b57692..f37a261a39358a1c3d709845708b1fd0884946b0 100644
--- a/device/bluetooth/bluetooth_remote_gatt_descriptor_mac.mm
+++ b/device/bluetooth/bluetooth_remote_gatt_descriptor_mac.mm
@@ -9,6 +9,7 @@
#include "base/strings/sys_string_conversions.h"
#include "base/threading/thread_task_runner_handle.h"
#import "device/bluetooth/bluetooth_adapter_mac.h"
+#include "device/bluetooth/bluetooth_adapter_mac_metrics.h"
#import "device/bluetooth/bluetooth_remote_gatt_characteristic_mac.h"
using base::mac::ObjCCast;
@@ -140,6 +141,9 @@ void BluetoothRemoteGattDescriptorMac::DidUpdateValueForDescriptor(
callbacks.swap(read_value_callbacks_);
value_read_or_write_in_progress_ = false;
if (error) {
+ LogNSErrorToHistogram(
+ error, WebBluetoothMacOSAPIs::
+ WEB_BLUETOOTH_MACOS_APIS_DID_UPDATE_VALUE_FOR_DESCRIPTOR);
BluetoothGattService::GattErrorCode error_code =
BluetoothDeviceMac::GetGattErrorCodeFromNSError(error);
VLOG(1) << *this << ": Read value failed with error: "
@@ -163,6 +167,9 @@ void BluetoothRemoteGattDescriptorMac::DidWriteValueForDescriptor(
callbacks.swap(write_value_callbacks_);
value_read_or_write_in_progress_ = false;
if (error) {
+ LogNSErrorToHistogram(
+ error, WebBluetoothMacOSAPIs::
+ WEB_BLUETOOTH_MACOS_APIS_DID_WRITE_VALUE_FOR_DESCRIPTOR);
BluetoothGattService::GattErrorCode error_code =
BluetoothDeviceMac::GetGattErrorCodeFromNSError(error);
VLOG(1) << *this << ": Write value failed with error: "

Powered by Google App Engine
This is Rietveld 408576698