histogram_flattener.h 992 B

12345678910111213141516171819202122232425262728293031323334
  1. // Copyright (c) 2012 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 BASE_METRICS_HISTOGRAM_FLATTENER_H_
  5. #define BASE_METRICS_HISTOGRAM_FLATTENER_H_
  6. #include <map>
  7. #include <string>
  8. #include "base/metrics/histogram.h"
  9. namespace base {
  10. class HistogramSamples;
  11. // HistogramFlattener is an interface used by HistogramSnapshotManager, which
  12. // handles the logistics of gathering up available histograms for recording.
  13. class BASE_EXPORT HistogramFlattener {
  14. public:
  15. HistogramFlattener(const HistogramFlattener&) = delete;
  16. HistogramFlattener& operator=(const HistogramFlattener&) = delete;
  17. virtual ~HistogramFlattener() = default;
  18. virtual void RecordDelta(const HistogramBase& histogram,
  19. const HistogramSamples& snapshot) = 0;
  20. protected:
  21. HistogramFlattener() = default;
  22. };
  23. } // namespace base
  24. #endif // BASE_METRICS_HISTOGRAM_FLATTENER_H_