chromium/crypto/unexportable_key_metrics.cc

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "crypto/unexportable_key_metrics.h"

#include <memory>

#include "base/feature_list.h"
#include "base/metrics/histogram_functions.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool.h"
#include "base/timer/elapsed_timer.h"
#include "crypto/unexportable_key.h"

namespace crypto {

namespace {

enum class KeyType {};

const SignatureVerifier::SignatureAlgorithm kAllAlgorithms[] =;

constexpr char kTestKeyName[] =;

// Leaving HW empty will keep the existing metric as is today.
std::string GetHistogramPrefixForKeyType(KeyType type) {}

std::string GetHistogramSuffixForAlgo(internal::TPMSupport algo) {}

internal::TPMType GetSupportedTpm(internal::TPMSupport hw,
                                  internal::TPMSupport virt) {}

void ReportUmaLatency(TPMOperation operation,
                      internal::TPMSupport algo,
                      base::TimeDelta latency,
                      KeyType type = KeyType::kHardwareKey) {}

void ReportUmaOperationSuccess(TPMOperation operation,
                               internal::TPMSupport algo,
                               bool status,
                               KeyType type = KeyType::kHardwareKey) {}

void ReportUmaTpmOperation(TPMOperation operation,
                           internal::TPMSupport algo,
                           base::TimeDelta latency,
                           bool status,
                           KeyType type = KeyType::kHardwareKey) {}

internal::TPMSupport MeasureVirtualTpmOperations() {}

void MeasureTpmOperationsInternal(UnexportableKeyProvider::Config config) {}

}  // namespace

namespace internal {

void MeasureTpmOperationsInternalForTesting() {}

}  // namespace internal

std::string OperationToString(TPMOperation operation) {}

std::string AlgorithmToString(SignatureVerifier::SignatureAlgorithm algorithm) {}

void MaybeMeasureTpmOperations(UnexportableKeyProvider::Config config) {}

}  // namespace crypto