histogram_flattener.h 949 B

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