| Index: content/browser/bluetooth/bluetooth_metrics.cc
|
| diff --git a/content/browser/bluetooth/bluetooth_metrics.cc b/content/browser/bluetooth/bluetooth_metrics.cc
|
| index c9e540517d0e3603a7503fb9a15ddd536b554390..321465524fa20567ef75d856dd271639fc94470f 100644
|
| --- a/content/browser/bluetooth/bluetooth_metrics.cc
|
| +++ b/content/browser/bluetooth/bluetooth_metrics.cc
|
| @@ -99,9 +99,11 @@ static void RecordUnionOfServices(
|
| union_of_services.insert(service->canonical_value());
|
| }
|
|
|
| - for (const auto& filter : options->filters) {
|
| - for (const base::Optional<BluetoothUUID>& service : filter->services) {
|
| - union_of_services.insert(service->canonical_value());
|
| + if (!options->filters.is_null()) {
|
| + for (const auto& filter : options->filters) {
|
| + for (const base::Optional<BluetoothUUID>& service : filter->services) {
|
| + union_of_services.insert(service->canonical_value());
|
| + }
|
| }
|
| }
|
|
|
| @@ -119,7 +121,13 @@ static void RecordUnionOfServices(
|
|
|
| void RecordRequestDeviceOptions(
|
| const blink::mojom::WebBluetoothRequestDeviceOptionsPtr& options) {
|
| - RecordRequestDeviceFilters(options->filters);
|
| + UMA_HISTOGRAM_BOOLEAN("Bluetooth.Web.RequestDevice.Options.AcceptAllDevices",
|
| + options->accept_all_devices);
|
| +
|
| + if (!options->filters.is_null()) {
|
| + RecordRequestDeviceFilters(options->filters);
|
| + }
|
| +
|
| RecordRequestDeviceOptionalServices(options->optional_services);
|
| RecordUnionOfServices(options);
|
| }
|
|
|