| Index: base/metrics/histogram_base.h
|
| diff --git a/base/metrics/histogram_base.h b/base/metrics/histogram_base.h
|
| index 40c2caedc313a815c6400b9893feb093c1a6d676..6817629bf8c080dd9a3fe259d96ff586c7ccebc2 100644
|
| --- a/base/metrics/histogram_base.h
|
| +++ b/base/metrics/histogram_base.h
|
| @@ -94,14 +94,18 @@ class BASE_EXPORT HistogramBase {
|
| };
|
|
|
| // Histogram data inconsistency types.
|
| - enum Inconsistency {
|
| + enum Inconsistency : uint32_t {
|
| NO_INCONSISTENCIES = 0x0,
|
| RANGE_CHECKSUM_ERROR = 0x1,
|
| BUCKET_ORDER_ERROR = 0x2,
|
| COUNT_HIGH_ERROR = 0x4,
|
| COUNT_LOW_ERROR = 0x8,
|
|
|
| - NEVER_EXCEEDED_VALUE = 0x10
|
| + NEVER_EXCEEDED_VALUE = 0x10,
|
| +
|
| + // This value is used only in HistogramSnapshotManager for marking
|
| + // internally when new inconsistencies are found.
|
| + NEW_INCONSISTENCY_FOUND = 0x8000000
|
| };
|
|
|
| explicit HistogramBase(const std::string& name);
|
| @@ -154,12 +158,17 @@ class BASE_EXPORT HistogramBase {
|
|
|
| // Try to find out data corruption from histogram and the samples.
|
| // The returned value is a combination of Inconsistency enum.
|
| - virtual int FindCorruption(const HistogramSamples& samples) const;
|
| + virtual uint32_t FindCorruption(const HistogramSamples& samples) const;
|
|
|
| // Snapshot the current complete set of sample data.
|
| // Override with atomic/locked snapshot if needed.
|
| virtual scoped_ptr<HistogramSamples> SnapshotSamples() const = 0;
|
|
|
| + // Calculate the change (delta) in histogram counts since the previous call
|
| + // to this method. Each successive call will return only those counts
|
| + // changed since the last call.
|
| + virtual scoped_ptr<HistogramSamples> SnapshotDelta() = 0;
|
| +
|
| // The following methods provide graphical histogram displays.
|
| virtual void WriteHTMLGraph(std::string* output) const = 0;
|
| virtual void WriteAscii(std::string* output) const = 0;
|
|
|