| Index: base/metrics/sample_map.h
|
| diff --git a/base/metrics/sample_map.h b/base/metrics/sample_map.h
|
| index da536e31e676d1e71516caf5c03c535719168451..2f24e1fa9e6dfddb8c10196d54ee905a9d26f1ef 100644
|
| --- a/base/metrics/sample_map.h
|
| +++ b/base/metrics/sample_map.h
|
| @@ -20,13 +20,15 @@
|
|
|
| namespace base {
|
|
|
| +// The logic here is similar to that of PersistentSampleMap but with different
|
| +// data structures. Changes here likely need to be duplicated there.
|
| class BASE_EXPORT SampleMap : public HistogramSamples {
|
| public:
|
| SampleMap();
|
| explicit SampleMap(uint64_t id);
|
| ~SampleMap() override;
|
|
|
| - // HistogramSamples implementation:
|
| + // HistogramSamples:
|
| void Accumulate(HistogramBase::Sample value,
|
| HistogramBase::Count count) override;
|
| HistogramBase::Count GetCount(HistogramBase::Sample value) const override;
|
| @@ -34,9 +36,8 @@ class BASE_EXPORT SampleMap : public HistogramSamples {
|
| scoped_ptr<SampleCountIterator> Iterator() const override;
|
|
|
| protected:
|
| - bool AddSubtractImpl(
|
| - SampleCountIterator* iter,
|
| - HistogramSamples::Operator op) override; // |op| is ADD or SUBTRACT.
|
| + // Performs arithemetic. |op| is ADD or SUBTRACT.
|
| + bool AddSubtractImpl(SampleCountIterator* iter, Operator op) override;
|
|
|
| private:
|
| std::map<HistogramBase::Sample, HistogramBase::Count> sample_counts_;
|
| @@ -44,28 +45,6 @@ class BASE_EXPORT SampleMap : public HistogramSamples {
|
| DISALLOW_COPY_AND_ASSIGN(SampleMap);
|
| };
|
|
|
| -class BASE_EXPORT SampleMapIterator : public SampleCountIterator {
|
| - public:
|
| - typedef std::map<HistogramBase::Sample, HistogramBase::Count>
|
| - SampleToCountMap;
|
| -
|
| - explicit SampleMapIterator(const SampleToCountMap& sample_counts);
|
| - ~SampleMapIterator() override;
|
| -
|
| - // SampleCountIterator implementation:
|
| - bool Done() const override;
|
| - void Next() override;
|
| - void Get(HistogramBase::Sample* min,
|
| - HistogramBase::Sample* max,
|
| - HistogramBase::Count* count) const override;
|
| -
|
| - private:
|
| - void SkipEmptyBuckets();
|
| -
|
| - SampleToCountMap::const_iterator iter_;
|
| - const SampleToCountMap::const_iterator end_;
|
| -};
|
| -
|
| } // namespace base
|
|
|
| #endif // BASE_METRICS_SAMPLE_MAP_H_
|
|
|