| Index: base/metrics/histogram.h
|
| diff --git a/base/metrics/histogram.h b/base/metrics/histogram.h
|
| index a76dd63226131b873490546965c9f572a1b2ce7c..98c07aa39f8db5020d6c4abdffba33e5847b6e50 100644
|
| --- a/base/metrics/histogram.h
|
| +++ b/base/metrics/histogram.h
|
| @@ -86,11 +86,13 @@ namespace base {
|
|
|
| class BooleanHistogram;
|
| class CustomHistogram;
|
| +class DelayedPersistentAllocation;
|
| class Histogram;
|
| class LinearHistogram;
|
| class Pickle;
|
| class PickleIterator;
|
| class SampleVector;
|
| +class SampleVectorBase;
|
|
|
| class BASE_EXPORT Histogram : public HistogramBase {
|
| public:
|
| @@ -142,9 +144,8 @@ class BASE_EXPORT Histogram : public HistogramBase {
|
| Sample minimum,
|
| Sample maximum,
|
| const BucketRanges* ranges,
|
| - HistogramBase::AtomicCount* counts,
|
| - HistogramBase::AtomicCount* logged_counts,
|
| - uint32_t counts_size,
|
| + const DelayedPersistentAllocation& counts,
|
| + const DelayedPersistentAllocation& logged_counts,
|
| HistogramSamples::Metadata* meta,
|
| HistogramSamples::Metadata* logged_meta);
|
|
|
| @@ -230,9 +231,8 @@ class BASE_EXPORT Histogram : public HistogramBase {
|
| Sample minimum,
|
| Sample maximum,
|
| const BucketRanges* ranges,
|
| - HistogramBase::AtomicCount* counts,
|
| - HistogramBase::AtomicCount* logged_counts,
|
| - uint32_t counts_size,
|
| + const DelayedPersistentAllocation& counts,
|
| + const DelayedPersistentAllocation& logged_counts,
|
| HistogramSamples::Metadata* meta,
|
| HistogramSamples::Metadata* logged_meta);
|
|
|
| @@ -274,10 +274,10 @@ class BASE_EXPORT Histogram : public HistogramBase {
|
| std::string* output) const;
|
|
|
| // Find out how large (graphically) the largest bucket will appear to be.
|
| - double GetPeakBucketSize(const SampleVector& samples) const;
|
| + double GetPeakBucketSize(const SampleVectorBase& samples) const;
|
|
|
| // Write a common header message describing this histogram.
|
| - void WriteAsciiHeader(const SampleVector& samples,
|
| + void WriteAsciiHeader(const SampleVectorBase& samples,
|
| Count sample_count,
|
| std::string* output) const;
|
|
|
| @@ -304,7 +304,7 @@ class BASE_EXPORT Histogram : public HistogramBase {
|
|
|
| // Finally, provide the state that changes with the addition of each new
|
| // sample.
|
| - std::unique_ptr<SampleVector> samples_;
|
| + std::unique_ptr<SampleVectorBase> samples_;
|
|
|
| // Also keep a previous uploaded state for calculating deltas.
|
| std::unique_ptr<HistogramSamples> logged_samples_;
|
| @@ -357,9 +357,8 @@ class BASE_EXPORT LinearHistogram : public Histogram {
|
| Sample minimum,
|
| Sample maximum,
|
| const BucketRanges* ranges,
|
| - HistogramBase::AtomicCount* counts,
|
| - HistogramBase::AtomicCount* logged_counts,
|
| - uint32_t counts_size,
|
| + const DelayedPersistentAllocation& counts,
|
| + const DelayedPersistentAllocation& logged_counts,
|
| HistogramSamples::Metadata* meta,
|
| HistogramSamples::Metadata* logged_meta);
|
|
|
| @@ -400,9 +399,8 @@ class BASE_EXPORT LinearHistogram : public Histogram {
|
| Sample minimum,
|
| Sample maximum,
|
| const BucketRanges* ranges,
|
| - HistogramBase::AtomicCount* counts,
|
| - HistogramBase::AtomicCount* logged_counts,
|
| - uint32_t counts_size,
|
| + const DelayedPersistentAllocation& counts,
|
| + const DelayedPersistentAllocation& logged_counts,
|
| HistogramSamples::Metadata* meta,
|
| HistogramSamples::Metadata* logged_meta);
|
|
|
| @@ -446,8 +444,8 @@ class BASE_EXPORT BooleanHistogram : public LinearHistogram {
|
| static std::unique_ptr<HistogramBase> PersistentCreate(
|
| const std::string& name,
|
| const BucketRanges* ranges,
|
| - HistogramBase::AtomicCount* counts,
|
| - HistogramBase::AtomicCount* logged_counts,
|
| + const DelayedPersistentAllocation& counts,
|
| + const DelayedPersistentAllocation& logged_counts,
|
| HistogramSamples::Metadata* meta,
|
| HistogramSamples::Metadata* logged_meta);
|
|
|
| @@ -460,8 +458,8 @@ class BASE_EXPORT BooleanHistogram : public LinearHistogram {
|
| BooleanHistogram(const std::string& name, const BucketRanges* ranges);
|
| BooleanHistogram(const std::string& name,
|
| const BucketRanges* ranges,
|
| - HistogramBase::AtomicCount* counts,
|
| - HistogramBase::AtomicCount* logged_counts,
|
| + const DelayedPersistentAllocation& counts,
|
| + const DelayedPersistentAllocation& logged_counts,
|
| HistogramSamples::Metadata* meta,
|
| HistogramSamples::Metadata* logged_meta);
|
|
|
| @@ -496,9 +494,8 @@ class BASE_EXPORT CustomHistogram : public Histogram {
|
| static std::unique_ptr<HistogramBase> PersistentCreate(
|
| const std::string& name,
|
| const BucketRanges* ranges,
|
| - HistogramBase::AtomicCount* counts,
|
| - HistogramBase::AtomicCount* logged_counts,
|
| - uint32_t counts_size,
|
| + const DelayedPersistentAllocation& counts,
|
| + const DelayedPersistentAllocation& logged_counts,
|
| HistogramSamples::Metadata* meta,
|
| HistogramSamples::Metadata* logged_meta);
|
|
|
| @@ -521,9 +518,8 @@ class BASE_EXPORT CustomHistogram : public Histogram {
|
|
|
| CustomHistogram(const std::string& name,
|
| const BucketRanges* ranges,
|
| - HistogramBase::AtomicCount* counts,
|
| - HistogramBase::AtomicCount* logged_counts,
|
| - uint32_t counts_size,
|
| + const DelayedPersistentAllocation& counts,
|
| + const DelayedPersistentAllocation& logged_counts,
|
| HistogramSamples::Metadata* meta,
|
| HistogramSamples::Metadata* logged_meta);
|
|
|
|
|