#include "device/bluetooth/bluez/metrics_recorder.h"
#include "base/containers/contains.h"
#include "base/metrics/histogram_functions.h"
namespace bluetooth {
namespace {
const char kBlueZInvalidArgumentsError[] = …;
const char kBlueZInProgressError[] = …;
const char kBlueZAlreadyExistsError[] = …;
const char kBlueZNotSupportedError[] = …;
const char kBlueZNotConnectedError[] = …;
const char kBlueZAlreadyConnectedError[] = …;
const char kBlueZNotAvailableError[] = …;
const char kBlueZDoesNotExistError[] = …;
const char kBlueZNotAuthorizedError[] = …;
const char kBlueZNotPermittedError[] = …;
const char kBlueZNoSuchAdapterError[] = …;
const char kBlueZAgentNotAvailableError[] = …;
const char kBlueZNotReadyError[] = …;
const char kBlueZFailedError[] = …;
const char kBlueZConnectionAlreadyConnected[] = …;
const char kBlueZPageTimeout[] = …;
const char kBlueZProfileUnavailable[] = …;
const char kBlueZSdpSearch[] = …;
const char kBlueZCreateSocket[] = …;
const char kBlueZInvalidArgument[] = …;
const char kBlueZAdapterNotPowered[] = …;
const char kBlueZNotSupported[] = …;
const char kBlueZBadSocket[] = …;
const char kBlueZMemoryAllocation[] = …;
const char kBlueZBusy[] = …;
const char kBlueZConcurrentConnectionLimit[] = …;
const char kBlueZTimeout[] = …;
const char kBlueZRefused[] = …;
const char kBlueZAbortedByRemote[] = …;
const char kBlueZAbortedByLocal[] = …;
const char kBlueZLmpProtocolError[] = …;
const char kBlueZCanceled[] = …;
const char kBlueZUnknown[] = …;
}
std::optional<ConnectToServiceInsecurelyResult> ExtractResultFromErrorString(
const std::string& error_string) { … }
ConnectToServiceFailureReason ExtractFailureReasonFromErrorString(
const std::string& error_string) { … }
void RecordConnectToServiceInsecurelyResult(
ConnectToServiceInsecurelyResult result) { … }
void RecordConnectToServiceFailureReason(ConnectToServiceFailureReason reason) { … }
void RecordBondedConnectToServiceFailureReason(
ConnectToServiceFailureReason reason) { … }
}