human_presence_metrics.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // Copyright 2022 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef ASH_SYSTEM_HUMAN_PRESENCE_HUMAN_PRESENCE_METRICS_H_
  5. #define ASH_SYSTEM_HUMAN_PRESENCE_HUMAN_PRESENCE_METRICS_H_
  6. #include "base/time/time.h"
  7. namespace ash {
  8. // Use two namespaces to keep constant names legible.
  9. namespace snooping_protection_metrics {
  10. constexpr char kEnabledHistogramName[] =
  11. "ChromeOS.HPS.SnoopingProtection.Enabled";
  12. constexpr char kPositiveDurationHistogramName[] =
  13. "ChromeOS.HPS.SnoopingProtection.Positive.Duration";
  14. constexpr char kNegativeDurationHistogramName[] =
  15. "ChromeOS.HPS.SnoopingProtection.Negative.Duration";
  16. constexpr char kFlakeyHistogramName[] =
  17. "ChromeOS.HPS.SnoopingProtection.FlakeyDetection";
  18. constexpr char kNotificationSuppressionEnabledHistogramName[] =
  19. "ChromeOS.HPS.SnoopingProtectionNotificationSuppression.Enabled";
  20. // Number of buckets to log SnoopingProtection present result.
  21. constexpr int kDurationNumBuckets = 100;
  22. // Minimum value for the SnoopingProtection.Positive.Duration and
  23. // SnoopingProtection.Negative.Duration.
  24. constexpr base::TimeDelta kDurationMin = base::Seconds(1);
  25. // Maximum value for SnoopingProtection.Positive.Duration; Longer than 1 hour is
  26. // considered as 1 hour.
  27. constexpr base::TimeDelta kPositiveDurationMax = base::Hours(1);
  28. // Maximum value for SnoopingProtection.Negative.Duration; Longer than 1 day is
  29. // considered as 1 day.
  30. constexpr base::TimeDelta kNegativeDurationMax = base::Hours(24);
  31. } // namespace snooping_protection_metrics
  32. namespace quick_dim_metrics {
  33. constexpr char kEnabledHistogramName[] = "ChromeOS.HPS.QuickDim.Enabled";
  34. } // namespace quick_dim_metrics
  35. } // namespace ash
  36. #endif // ASH_SYSTEM_HUMAN_PRESENCE_HUMAN_PRESENCE_METRICS_H_