#include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/metrics_utils.h"
#include "base/metrics/histogram_functions.h"
#include "base/strings/stringprintf.h"
#include "crypto/signature_verifier.h"
BPKUR;
namespace enterprise_connectors {
namespace {
constexpr char kLoadedKeyTrustLevelHistogram[] = …;
constexpr char kLoadedKeyTypeHistogram[] = …;
constexpr char kLoadPersistedKeyResultHistogram[] = …;
constexpr char kKeyCreationResultHistogram[] = …;
constexpr char kKeyRotationResultHistogram[] = …;
DTKeyTrustLevel ConvertTrustLevel(BPKUR::KeyTrustLevel trust_level) { … }
DTKeyType AlgorithmToType(
crypto::SignatureVerifier::SignatureAlgorithm algorithm) { … }
std::string GetHistogramVariant(BPKUR::KeyTrustLevel trust_level) { … }
DTKeyRotationResult ResultFromStatus(KeyRotationCommand::Status status) { … }
}
void LogKeyLoadingResult(
std::optional<DeviceTrustKeyManager::KeyMetadata> key_metadata,
LoadPersistedKeyResult result) { … }
void LogKeyRotationResult(bool had_nonce, KeyRotationCommand::Status status) { … }
void LogSynchronizationError(DTSynchronizationError error) { … }
void LogSignatureLatency(BPKUR::KeyTrustLevel trust_level,
base::TimeTicks start_time) { … }
}