OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // SampleMap implements HistogramSamples interface. It is used by the | 5 // SampleMap implements HistogramSamples interface. It is used by the |
6 // SparseHistogram class to store samples. | 6 // SparseHistogram class to store samples. |
7 | 7 |
8 #ifndef BASE_METRICS_SAMPLE_MAP_H_ | 8 #ifndef BASE_METRICS_SAMPLE_MAP_H_ |
9 #define BASE_METRICS_SAMPLE_MAP_H_ | 9 #define BASE_METRICS_SAMPLE_MAP_H_ |
10 | 10 |
| 11 #include <stdint.h> |
| 12 |
11 #include <map> | 13 #include <map> |
12 | 14 |
13 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
| 16 #include "base/macros.h" |
14 #include "base/memory/scoped_ptr.h" | 17 #include "base/memory/scoped_ptr.h" |
15 #include "base/metrics/histogram_base.h" | 18 #include "base/metrics/histogram_base.h" |
16 #include "base/metrics/histogram_samples.h" | 19 #include "base/metrics/histogram_samples.h" |
17 | 20 |
18 namespace base { | 21 namespace base { |
19 | 22 |
20 class BASE_EXPORT SampleMap : public HistogramSamples { | 23 class BASE_EXPORT SampleMap : public HistogramSamples { |
21 public: | 24 public: |
22 SampleMap(); | 25 SampleMap(); |
23 explicit SampleMap(uint64_t id); | 26 explicit SampleMap(uint64_t id); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 private: | 62 private: |
60 void SkipEmptyBuckets(); | 63 void SkipEmptyBuckets(); |
61 | 64 |
62 SampleToCountMap::const_iterator iter_; | 65 SampleToCountMap::const_iterator iter_; |
63 const SampleToCountMap::const_iterator end_; | 66 const SampleToCountMap::const_iterator end_; |
64 }; | 67 }; |
65 | 68 |
66 } // namespace base | 69 } // namespace base |
67 | 70 |
68 #endif // BASE_METRICS_SAMPLE_MAP_H_ | 71 #endif // BASE_METRICS_SAMPLE_MAP_H_ |
OLD | NEW |