counts.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright 2015 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 COMPONENTS_PROFILE_METRICS_COUNTS_H_
  5. #define COMPONENTS_PROFILE_METRICS_COUNTS_H_
  6. #include "base/metrics/histogram_base.h"
  7. namespace profile_metrics {
  8. // These values are persisted to logs. Entries should not be renumbered and
  9. // numeric values should never be reused.
  10. enum class ProfileColorsUniqueness {
  11. kSingleProfile = 0,
  12. kUnique = 1,
  13. kUniqueExceptForRepeatedDefault = 2,
  14. kRepeated = 3,
  15. kMaxValue = kRepeated,
  16. };
  17. struct Counts {
  18. base::HistogramBase::Sample total = 0;
  19. base::HistogramBase::Sample signedin = 0;
  20. base::HistogramBase::Sample supervised = 0;
  21. base::HistogramBase::Sample active = 0;
  22. base::HistogramBase::Sample unused = 0;
  23. ProfileColorsUniqueness colors_uniqueness =
  24. ProfileColorsUniqueness::kRepeated;
  25. };
  26. // Logs metrics related to |counts|.
  27. void LogProfileMetricsCounts(const Counts& counts);
  28. } // namespace profile_metrics
  29. #endif // COMPONENTS_PROFILE_METRICS_COUNTS_H_