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 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 ~SampleMapIterator() override; | 49 ~SampleMapIterator() override; |
50 | 50 |
51 // SampleCountIterator implementation: | 51 // SampleCountIterator implementation: |
52 bool Done() const override; | 52 bool Done() const override; |
53 void Next() override; | 53 void Next() override; |
54 void Get(HistogramBase::Sample* min, | 54 void Get(HistogramBase::Sample* min, |
55 HistogramBase::Sample* max, | 55 HistogramBase::Sample* max, |
56 HistogramBase::Count* count) const override; | 56 HistogramBase::Count* count) const override; |
57 | 57 |
58 private: | 58 private: |
| 59 void SkipEmptyBuckets(); |
| 60 |
59 SampleToCountMap::const_iterator iter_; | 61 SampleToCountMap::const_iterator iter_; |
60 const SampleToCountMap::const_iterator end_; | 62 const SampleToCountMap::const_iterator end_; |
61 }; | 63 }; |
62 | 64 |
63 } // namespace base | 65 } // namespace base |
64 | 66 |
65 #endif // BASE_METRICS_SAMPLE_MAP_H_ | 67 #endif // BASE_METRICS_SAMPLE_MAP_H_ |
OLD | NEW |