| 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 #ifndef BASE_METRICS_HISTOGRAM_SAMPLES_H_ | 5 #ifndef BASE_METRICS_HISTOGRAM_SAMPLES_H_ |
| 6 #define BASE_METRICS_HISTOGRAM_SAMPLES_H_ | 6 #define BASE_METRICS_HISTOGRAM_SAMPLES_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/metrics/histogram_base.h" | 9 #include "base/metrics/histogram_base.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 | 11 |
| 12 namespace base { |
| 13 |
| 12 class Pickle; | 14 class Pickle; |
| 13 class PickleIterator; | 15 class PickleIterator; |
| 14 | |
| 15 namespace base { | |
| 16 | |
| 17 class SampleCountIterator; | 16 class SampleCountIterator; |
| 18 | 17 |
| 19 // HistogramSamples is a container storing all samples of a histogram. | 18 // HistogramSamples is a container storing all samples of a histogram. |
| 20 class BASE_EXPORT HistogramSamples { | 19 class BASE_EXPORT HistogramSamples { |
| 21 public: | 20 public: |
| 22 HistogramSamples(); | 21 HistogramSamples(); |
| 23 virtual ~HistogramSamples(); | 22 virtual ~HistogramSamples(); |
| 24 | 23 |
| 25 virtual void Accumulate(HistogramBase::Sample value, | 24 virtual void Accumulate(HistogramBase::Sample value, |
| 26 HistogramBase::Count count) = 0; | 25 HistogramBase::Count count) = 0; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 79 |
| 81 // Get the index of current histogram bucket. | 80 // Get the index of current histogram bucket. |
| 82 // For histograms that don't use predefined buckets, it returns false. | 81 // For histograms that don't use predefined buckets, it returns false. |
| 83 // Requires: !Done(); | 82 // Requires: !Done(); |
| 84 virtual bool GetBucketIndex(size_t* index) const; | 83 virtual bool GetBucketIndex(size_t* index) const; |
| 85 }; | 84 }; |
| 86 | 85 |
| 87 } // namespace base | 86 } // namespace base |
| 88 | 87 |
| 89 #endif // BASE_METRICS_HISTOGRAM_SAMPLES_H_ | 88 #endif // BASE_METRICS_HISTOGRAM_SAMPLES_H_ |
| OLD | NEW |