#include "components/metrics/single_sample_metrics_factory_impl.h"
#include <memory>
#include "base/threading/thread_checker.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "third_party/abseil-cpp/absl/base/attributes.h"
namespace metrics {
namespace {
class SingleSampleMetricImpl : public base::SingleSampleMetric { … };
ABSL_CONST_INIT thread_local mojo::Remote<mojom::SingleSampleMetricsProvider>*
provider = …;
}
SingleSampleMetricsFactoryImpl::SingleSampleMetricsFactoryImpl(
CreateProviderCB create_provider_cb)
: … { … }
SingleSampleMetricsFactoryImpl::~SingleSampleMetricsFactoryImpl() { … }
std::unique_ptr<base::SingleSampleMetric>
SingleSampleMetricsFactoryImpl::CreateCustomCountsMetric(
const std::string& histogram_name,
base::HistogramBase::Sample min,
base::HistogramBase::Sample max,
uint32_t bucket_count) { … }
void SingleSampleMetricsFactoryImpl::DestroyProviderForTesting() { … }
std::unique_ptr<base::SingleSampleMetric>
SingleSampleMetricsFactoryImpl::CreateMetric(const std::string& histogram_name,
base::HistogramBase::Sample min,
base::HistogramBase::Sample max,
uint32_t bucket_count,
int32_t flags) { … }
mojom::SingleSampleMetricsProvider*
SingleSampleMetricsFactoryImpl::GetProvider() { … }
}