blob: 19f6a5e524751bb098852c421518364518ab8c0c [file] [log] [blame]
// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/feedback/redaction_tool/inprocess_metrics_tester.h"
#include "components/feedback/redaction_tool/inprocess_metrics_recorder.h"
namespace redaction {
std::unique_ptr<MetricsTester> MetricsTester::Create() {
return std::make_unique<InprocessMetricsTester>();
}
size_t InprocessMetricsTester::GetBucketCount(base::StringPiece histogram_name,
int histogram_value) {
return histogram_tester_.GetBucketCount(histogram_name, histogram_value);
}
size_t InprocessMetricsTester::GetNumBucketEntries(
base::StringPiece histogram_name) {
return histogram_tester_.GetAllSamples(histogram_name).size();
}
std::unique_ptr<RedactionToolMetricsRecorder>
InprocessMetricsTester::SetupRecorder() {
return std::make_unique<InprocessMetricsRecorder>();
}
} // namespace redaction