#include "content/browser/bluetooth/bluetooth_metrics.h"
#include <stdint.h>
#include <algorithm>
#include <map>
#include <set>
#include <unordered_set>
#include "base/hash/hash.h"
#include "base/metrics/histogram_functions.h"
#include "base/metrics/histogram_macros.h"
#include "device/bluetooth/public/cpp/bluetooth_uuid.h"
BluetoothUUID;
namespace {
int HashUUID(const std::string& canonical_uuid) { … }
int HashUUID(const std::optional<BluetoothUUID>& uuid) { … }
}
namespace content {
void RecordRequestDeviceOptions(
const blink::mojom::WebBluetoothRequestDeviceOptionsPtr& options) { … }
void RecordConnectGATTOutcome(UMAConnectGATTOutcome outcome) { … }
void RecordConnectGATTOutcome(CacheQueryOutcome outcome) { … }
void RecordGetPrimaryServicesServices(
blink::mojom::WebBluetoothGATTQueryQuantity quantity,
const std::optional<BluetoothUUID>& service) { … }
void RecordGetCharacteristicsCharacteristic(
blink::mojom::WebBluetoothGATTQueryQuantity quantity,
const std::optional<BluetoothUUID>& characteristic) { … }
void RecordGATTOperationOutcome(UMAGATTOperation operation,
UMAGATTOperationOutcome outcome) { … }
static UMAGATTOperationOutcome TranslateCacheQueryOutcomeToGATTOperationOutcome(
CacheQueryOutcome outcome) { … }
void RecordCharacteristicReadValueOutcome(UMAGATTOperationOutcome outcome) { … }
void RecordCharacteristicReadValueOutcome(CacheQueryOutcome outcome) { … }
void RecordCharacteristicWriteValueOutcome(UMAGATTOperationOutcome outcome) { … }
void RecordCharacteristicWriteValueOutcome(CacheQueryOutcome outcome) { … }
void RecordStartNotificationsOutcome(UMAGATTOperationOutcome outcome) { … }
void RecordStartNotificationsOutcome(CacheQueryOutcome outcome) { … }
void RecordRSSISignalStrength(int rssi) { … }
void RecordRSSISignalStrengthLevel(UMARSSISignalStrengthLevel level) { … }
}