| Index: base/metrics/histogram.h
|
| diff --git a/base/metrics/histogram.h b/base/metrics/histogram.h
|
| index 20d5104c9bdd4aec31bcb8a22bf6bf6dff5f7b21..503d246379c01099fe91b1447587c56ccfb0b5bf 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);
|
|
|
| @@ -231,9 +232,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);
|
|
|
| @@ -275,10 +275,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;
|
|
|
| @@ -305,7 +305,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_;
|
| @@ -358,9 +358,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);
|
|
|
| @@ -401,9 +400,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);
|
|
|
| @@ -447,8 +445,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);
|
|
|
| @@ -461,8 +459,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);
|
|
|
| @@ -497,9 +495,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);
|
|
|
| @@ -522,9 +519,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);
|
|
|
|
|