#include "chrome/browser/ui/webauthn/user_actions.h"
#include <optional>
#include <string_view>
#include <vector>
#include "base/metrics/user_metrics.h"
#include "base/metrics/user_metrics_action.h"
#include "base/strings/strcat.h"
#include "chrome/browser/webauthn/authenticator_request_dialog_model.h"
#include "device/fido/fido_types.h"
#include "third_party/abseil-cpp/absl/types/variant.h"
#include "ui/gfx/vector_icon_types.h"
namespace webauthn::user_actions {
namespace {
Mechanism;
AuthenticatorType;
constexpr std::string_view kGpmAndICloudAndProfile = …;
constexpr std::string_view kGpmAndICloud = …;
constexpr std::string_view kGpmAndWin = …;
constexpr std::string_view kGpmAndProfile = …;
constexpr std::string_view kICloudAndProfile = …;
constexpr std::string_view kGpmOnly = …;
constexpr std::string_view kICloudOnly = …;
constexpr std::string_view kWinOnly = …;
constexpr std::string_view kProfileOnly = …;
constexpr std::string_view kOthers = …;
enum class AuthenticatorCategory { … };
AuthenticatorCategory CategoryFromMechanism(const Mechanism& mechanism) { … }
std::tuple<bool, bool, bool, bool> AuthenticatorsAvailable(
const std::vector<Mechanism>& mechanisms) { … }
}
void RecordMultipleOptionsShown(const std::vector<Mechanism>& mechanisms,
bool is_create) { … }
void RecordPriorityOptionShown(const Mechanism& mechanism) { … }
void RecordMechanismClick(const Mechanism& mech) { … }
void RecordCancelClick() { … }
void RecordAcceptClick() { … }
void RecordTrustDialogShown(bool is_create) { … }
void RecordCreateGpmDialogShown() { … }
void RecordRecoveryShown(bool is_create) { … }
void RecordRecoveryCancelled() { … }
void RecordRecoverySucceeded() { … }
void RecordICloudShown(bool is_create) { … }
void RecordICloudCancelled() { … }
void RecordICloudSuccess() { … }
void RecordGpmTouchIdDialogShown(bool is_create) { … }
void RecordGpmPinSheetShown(bool is_credential_creation,
bool is_pin_creation,
bool is_arbitrary) { … }
void RecordGpmForgotPinClick() { … }
void RecordGpmPinOptionChangeClick() { … }
void RecordGpmLockedShown() { … }
void RecordGpmWinUvShown(bool is_create) { … }
void RecordGpmSuccess() { … }
void RecordGpmFailureShown() { … }
void RecordChromeProfileAuthenticatorShown(bool is_create) { … }
void RecordChromeProfileCancelled() { … }
void RecordChromeProfileSuccess() { … }
void RecordWindowsHelloShown(bool is_create) { … }
void RecordWindowsHelloCancelled() { … }
void RecordWindowsHelloSuccess() { … }
}