| Index: content/browser/bluetooth/bluetooth_metrics.cc
|
| diff --git a/content/browser/bluetooth/bluetooth_metrics.cc b/content/browser/bluetooth/bluetooth_metrics.cc
|
| index dcbc576f88bf9699c31fb8a18c1a3956cd68295f..7a0b4722f7dd4bb77a30d4ca8497935cb0690ba4 100644
|
| --- a/content/browser/bluetooth/bluetooth_metrics.cc
|
| +++ b/content/browser/bluetooth/bluetooth_metrics.cc
|
| @@ -101,12 +101,14 @@ static void RecordUnionOfServices(
|
| union_of_services.insert(service.canonical_value());
|
| }
|
|
|
| - for (const auto& filter : options->filters) {
|
| - if (!filter->services) {
|
| - continue;
|
| - }
|
| - for (const BluetoothUUID& service : filter->services.value()) {
|
| - union_of_services.insert(service.canonical_value());
|
| + if (options->filters) {
|
| + for (const auto& filter : options->filters.value()) {
|
| + if (!filter->services) {
|
| + continue;
|
| + }
|
| + for (const BluetoothUUID& service : filter->services.value()) {
|
| + union_of_services.insert(service.canonical_value());
|
| + }
|
| }
|
| }
|
|
|
| @@ -124,7 +126,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) {
|
| + RecordRequestDeviceFilters(options->filters.value());
|
| + }
|
| +
|
| RecordRequestDeviceOptionalServices(options->optional_services);
|
| RecordUnionOfServices(options);
|
| }
|
|
|