chromium/components/enterprise/data_controls/core/browser/dlp_histogram_helper.h

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

#ifndef COMPONENTS_ENTERPRISE_DATA_CONTROLS_CORE_BROWSER_DLP_HISTOGRAM_HELPER_H_
#define COMPONENTS_ENTERPRISE_DATA_CONTROLS_CORE_BROWSER_DLP_HISTOGRAM_HELPER_H_

#include <string>

#include "base/metrics/histogram_functions.h"
#include "components/enterprise/data_controls/core/browser/rule.h"

namespace data_controls {

namespace dlp {

// Constants with UMA histogram name suffixes.
inline constexpr char kCaptureModeInitBlockedUMA[] =;
inline constexpr char kCaptureModeInitWarnedUMA[] =;
inline constexpr char kClipboardReadBlockedUMA[] =;
inline constexpr char kDataTransferReportingTimeDiffUMA[] =;
inline constexpr char kDataTransferControllerStartedUMA[] =;
inline constexpr char kDlpPolicyPresentUMA[] =;
inline constexpr char kDragDropBlockedUMA[] =;
inline constexpr char kFileActionBlockedUMA[] =;
inline constexpr char kFileActionBlockReviewedUMA[] =;
inline constexpr char kFilesBlockedCountUMA[] =;
inline constexpr char kFileActionWarnedUMA[] =;
inline constexpr char kFileActionWarnProceededUMA[] =;
inline constexpr char kFileActionWarnTimedOutUMA[] =;
inline constexpr char kFileActionWarnReviewedUMA[] =;
inline constexpr char kFilesWarnedCountUMA[] =;
inline constexpr char kFilesAppOpenTimedOutUMA[] =;
inline constexpr char kFilesDaemonStartedUMA[] =;
inline constexpr char kSameFileEventTimeDiffUMA[] =;
inline constexpr char kPrintingBlockedUMA[] =;
inline constexpr char kPrintingWarnedUMA[] =;
inline constexpr char kPrintingWarnProceededUMA[] =;
inline constexpr char kPrintingWarnSilentProceededUMA[] =;
inline constexpr char kPrivacyScreenEnforcedUMA[] =;
inline constexpr char kScreenShareBlockedUMA[] =;
inline constexpr char kScreenShareWarnedUMA[] =;
inline constexpr char kScreenShareWarnProceededUMA[] =;
inline constexpr char kScreenShareWarnSilentProceededUMA[] =;
inline constexpr char kScreenSharePausedOrResumedUMA[] =;
inline constexpr char kScreenshotBlockedUMA[] =;
inline constexpr char kScreenshotWarnedUMA[] =;
inline constexpr char kScreenshotWarnProceededUMA[] =;
inline constexpr char kScreenshotWarnSilentProceededUMA[] =;
inline constexpr char kVideoCaptureInterruptedUMA[] =;
inline constexpr char kReportedBlockLevelRestriction[] =;
inline constexpr char kReportedReportLevelRestriction[] =;
inline constexpr char kReportedWarnLevelRestriction[] =;
inline constexpr char kReportedWarnProceedLevelRestriction[] =;
inline constexpr char kReportedEventStatus[] =;
inline constexpr char kConfidentialContentsCount[] =;
inline constexpr char kActiveFileEventsCount[] =;
inline constexpr char kErrorsReportQueueNotReady[] =;
inline constexpr char kErrorsFilesPolicySetup[] =;
inline constexpr char kFilesUnknownAccessLevel[] =;
inline constexpr char kFilesDefaultFileAccess[] =;

}  // namespace dlp

std::string GetDlpHistogramPrefix();

void DlpBooleanHistogram(const std::string& suffix, bool value);

void DlpCountHistogram(const std::string& suffix, int sample, int max);

void DlpRestrictionConfiguredHistogram(Rule::Restriction value);

template <typename T>
void DlpHistogramEnumeration(const std::string& suffix, T sample) {}

void DlpCountHistogram10000(const std::string& suffix, int sample);

}  // namespace data_controls

#endif  // COMPONENTS_ENTERPRISE_DATA_CONTROLS_CORE_BROWSER_DLP_HISTOGRAM_HELPER_H_