histogram_flattener.h 988 B

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