• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
5 #ifndef BASE_METRICS_HISTOGRAM_FLATTENER_H_
6 #define BASE_METRICS_HISTOGRAM_FLATTENER_H_
7 
8 #include <map>
9 #include <string>
10 
11 #include "base/macros.h"
12 #include "base/metrics/histogram.h"
13 
14 namespace base {
15 
16 class HistogramSamples;
17 
18 // HistogramFlattener is an interface used by HistogramSnapshotManager, which
19 // handles the logistics of gathering up available histograms for recording.
20 class BASE_EXPORT HistogramFlattener {
21  public:
22   virtual void RecordDelta(const HistogramBase& histogram,
23                            const HistogramSamples& snapshot) = 0;
24 
25  protected:
26   HistogramFlattener() = default;
27   virtual ~HistogramFlattener() = default;
28 
29  private:
30   DISALLOW_COPY_AND_ASSIGN(HistogramFlattener);
31 };
32 
33 }  // namespace base
34 
35 #endif  // BASE_METRICS_HISTOGRAM_FLATTENER_H_
36