Chromium Code Reviews| Index: base/metrics/histogram_base.h |
| diff --git a/base/metrics/histogram_base.h b/base/metrics/histogram_base.h |
| index 729670cf98699e9af4a3215b6494cc62cdd515d0..30e7c2df5594f76f3b2a9c98da4e9120e45dabb7 100644 |
| --- a/base/metrics/histogram_base.h |
| +++ b/base/metrics/histogram_base.h |
| @@ -48,6 +48,17 @@ BASE_EXPORT void DeserializeHistogramAndAddSamples(PickleIterator* iter); |
| //////////////////////////////////////////////////////////////////////////////// |
| +// Histogram data inconsistency types. |
| +enum BASE_EXPORT HistogramInconsistency { |
| + NO_INCONSISTENCIES = 0x0, |
|
brettw
2013/02/28 22:56:25
This creates things named base::COUNT_LOW_ERROR, f
kaiwang
2013/03/01 00:52:12
Done.
|
| + RANGE_CHECKSUM_ERROR = 0x1, |
| + BUCKET_ORDER_ERROR = 0x2, |
| + COUNT_HIGH_ERROR = 0x4, |
| + COUNT_LOW_ERROR = 0x8, |
| + |
| + NEVER_EXCEEDED_VALUE = 0x10 |
| +}; |
| + |
| class BASE_EXPORT HistogramBase { |
| public: |
| typedef int Sample; // Used for samples. |
| @@ -103,6 +114,10 @@ class BASE_EXPORT HistogramBase { |
| // does not serialize the samples. |
| bool SerializeInfo(Pickle* pickle) const; |
| + // Try to find out data corruption from histogram and the samples. |
| + // The returned value is a combination of HistogramInconsistency enum. |
| + virtual int 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; |