| Index: base/metrics/histogram.h
|
| diff --git a/base/metrics/histogram.h b/base/metrics/histogram.h
|
| index f3007a286123d25dd6fe915555022929fb7f7e01..c6e9066fa136939d2f5a7332a8e1b4c508060401 100644
|
| --- a/base/metrics/histogram.h
|
| +++ b/base/metrics/histogram.h
|
| @@ -416,8 +416,6 @@ class BASE_EXPORT Histogram : public HistogramBase {
|
| size_t bucket_count,
|
| BucketRanges* ranges);
|
|
|
| - virtual void Add(Sample value) OVERRIDE;
|
| -
|
| // This method is an interface, used only by BooleanHistogram.
|
| virtual void AddBoolean(bool value);
|
|
|
| @@ -432,10 +430,6 @@ class BASE_EXPORT Histogram : public HistogramBase {
|
| // This method is an interface, used only by LinearHistogram.
|
| virtual void SetRangeDescriptions(const DescriptionPair descriptions[]);
|
|
|
| - // The following methods provide graphical histogram displays.
|
| - virtual void WriteHTMLGraph(std::string* output) const OVERRIDE;
|
| - virtual void WriteAscii(std::string* output) const OVERRIDE;
|
| -
|
| // Convenience methods for serializing/deserializing the histograms.
|
| // Histograms from Renderer process are serialized and sent to the browser.
|
| // Browser process reconstructs the histogram from the pickled version
|
| @@ -478,13 +472,26 @@ class BASE_EXPORT Histogram : public HistogramBase {
|
| virtual size_t bucket_count() const;
|
| const BucketRanges* bucket_ranges() const { return bucket_ranges_; }
|
|
|
| - // Snapshot the current complete set of sample data.
|
| - // Override with atomic/locked snapshot if needed.
|
| - virtual scoped_ptr<HistogramSamples> SnapshotSamples() const OVERRIDE;
|
| + // This function validates histogram construction arguments. It returns false
|
| + // if some of the arguments are totally bad.
|
| + // Note. Currently it allow some bad input, e.g. 0 as minimum, but silently
|
| + // converts it to good input: 1.
|
| + // TODO(kaiwang): Be more restrict and return false for any bad input, and
|
| + // make this a readonly validating function.
|
| + static bool InspectConstructionArguments(const std::string& name,
|
| + Sample* minimum,
|
| + Sample* maximum,
|
| + size_t* bucket_count);
|
|
|
| + // HistogramBase implementation:
|
| virtual bool HasConstructionArguments(Sample minimum,
|
| Sample maximum,
|
| - size_t bucket_count);
|
| + size_t bucket_count) const OVERRIDE;
|
| + virtual void Add(Sample value) OVERRIDE;
|
| + virtual scoped_ptr<HistogramSamples> SnapshotSamples() const OVERRIDE;
|
| + virtual void WriteHTMLGraph(std::string* output) const OVERRIDE;
|
| + virtual void WriteAscii(std::string* output) const OVERRIDE;
|
| +
|
| protected:
|
| // |bucket_count| and |ranges| should contain the underflow and overflow
|
| // buckets. See top comments for example.
|
| @@ -496,17 +503,6 @@ class BASE_EXPORT Histogram : public HistogramBase {
|
|
|
| virtual ~Histogram();
|
|
|
| - // This function validates histogram construction arguments. It returns false
|
| - // if some of the arguments are totally bad.
|
| - // Note. Currently it allow some bad input, e.g. 0 as minimum, but silently
|
| - // converts it to good input: 1.
|
| - // TODO(kaiwang): Be more restrict and return false for any bad input, and
|
| - // make this a readonly validating function.
|
| - static bool InspectConstructionArguments(const std::string& name,
|
| - Sample* minimum,
|
| - Sample* maximum,
|
| - size_t* bucket_count);
|
| -
|
| // Serialize the histogram's ranges to |*pickle|, returning true on success.
|
| // Most subclasses can leave this no-op implementation, but some will want to
|
| // override it, especially if the ranges cannot be re-derived from other
|
|
|