blob: 74b9bf2d6be35bb7f94c38ec3d45b92db7fcb28d [file] [log] [blame]
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/metrics/structured/histogram_util.h"
#include "base/metrics/histogram_macros.h"
namespace metrics {
namespace structured {
void LogInternalError(StructuredMetricsError error) {
UMA_HISTOGRAM_ENUMERATION("UMA.StructuredMetrics.InternalError", error);
}
void LogPrefReadError(PersistentPrefStore::PrefReadError error) {
UMA_HISTOGRAM_ENUMERATION("UMA.StructuredMetrics.PrefReadError", error,
PersistentPrefStore::PREF_READ_ERROR_MAX_ENUM);
}
void LogEventRecordingState(EventRecordingState state) {
UMA_HISTOGRAM_ENUMERATION("UMA.StructuredMetrics.EventRecordingState", state);
}
void LogNumEventsInUpload(const int num_events) {
UMA_HISTOGRAM_COUNTS_1000("UMA.StructuredMetrics.NumEventsInUpload",
num_events);
}
void LogKeyValidation(KeyValidationState state) {
UMA_HISTOGRAM_ENUMERATION("UMA.StructuredMetrics.KeyValidationState", state);
}
} // namespace structured
} // namespace metrics