1 // Copyright 2012 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef BASE_METRICS_HISTOGRAM_FLATTENER_H_ 6 #define BASE_METRICS_HISTOGRAM_FLATTENER_H_ 7 8 #include "base/base_export.h" 9 #include "base/metrics/histogram.h" 10 11 namespace base { 12 13 class HistogramSamples; 14 15 // HistogramFlattener is an interface used by HistogramSnapshotManager, which 16 // handles the logistics of gathering up available histograms for recording. 17 class BASE_EXPORT HistogramFlattener { 18 public: 19 HistogramFlattener(const HistogramFlattener&) = delete; 20 HistogramFlattener& operator=(const HistogramFlattener&) = delete; 21 virtual ~HistogramFlattener() = default; 22 23 virtual void RecordDelta(const HistogramBase& histogram, 24 const HistogramSamples& snapshot) = 0; 25 26 protected: 27 HistogramFlattener() = default; 28 }; 29 30 } // namespace base 31 32 #endif // BASE_METRICS_HISTOGRAM_FLATTENER_H_ 33