#include "components/trusted_vault/trusted_vault_histograms.h"
#include <string>
#include "base/metrics/histogram_functions.h"
#include "base/notreached.h"
#include "base/strings/strcat.h"
#include "components/trusted_vault/trusted_vault_server_constants.h"
namespace trusted_vault {
namespace {
std::string GetTrustedVaultURLFetchReasonSuffix(
TrustedVaultURLFetchReasonForUMA reason) { … }
std::string GetRecoveryKeyStoreURLFetchReasonSuffix(
RecoveryKeyStoreURLFetchReasonForUMA reason) { … }
}
enum class SecurityDomainIdOrInvalidForUma { … };
SecurityDomainIdOrInvalidForUma GetSecurityDomainIdOrInvalidForUma(
std::optional<SecurityDomainId> security_domain) { … }
void RecordTrustedVaultHintDegradedRecoverabilityChangedReason(
TrustedVaultHintDegradedRecoverabilityChangedReasonForUMA
hint_degraded_recoverability_changed_reason) { … }
void RecordTrustedVaultDeviceRegistrationState(
TrustedVaultDeviceRegistrationStateForUMA registration_state) { … }
void RecordTrustedVaultDeviceRegistrationOutcome(
TrustedVaultDeviceRegistrationOutcomeForUMA registration_outcome) { … }
void RecordTrustedVaultURLFetchResponse(SecurityDomainId security_domain_id,
TrustedVaultURLFetchReasonForUMA reason,
int http_response_code,
int net_error) { … }
void RecordRecoveryKeyStoreURLFetchResponse(
RecoveryKeyStoreURLFetchReasonForUMA reason,
int http_response_code,
int net_error) { … }
void RecordTrustedVaultDownloadKeysStatus(
TrustedVaultDownloadKeysStatusForUMA status,
bool also_log_with_v1_suffix) { … }
void RecordTrustedVaultFileReadStatus(TrustedVaultFileReadStatusForUMA status) { … }
void RecordTrustedVaultSetEncryptionKeysForSecurityDomain(
std::optional<SecurityDomainId> security_domain,
IsOffTheRecord is_off_the_record) { … }
void RecordCallToJsSetClientEncryptionKeysWithSecurityDomainToUma(
std::optional<SecurityDomainId> security_domain) { … }
std::string GetSecurityDomainNameForUma(SecurityDomainId domain) { … }
}