Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4355)

Unified Diff: base/metrics/histogram_flattener.h

Issue 10857067: Add comments to HistogramFlatterner interface and rename a function (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/metrics/histogram_snapshot_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/histogram_flattener.h
===================================================================
--- base/metrics/histogram_flattener.h (revision 151415)
+++ base/metrics/histogram_flattener.h (working copy)
@@ -14,19 +14,29 @@
namespace base {
-// HistogramFlattener is an interface for the logistics of gathering up
-// available histograms for recording. The implementors handle the exact lower
-// level recording mechanism, or error report mechanism.
+// HistogramFlattener is an interface used by HistogramSnapshotManager, which
+// handles the logistics of gathering up available histograms for recording.
+// The implementors handle the exact lower level recording mechanism, or
+// error report mechanism.
class BASE_EXPORT HistogramFlattener {
public:
virtual void RecordDelta(const base::Histogram& histogram,
const base::Histogram::SampleSet& snapshot) = 0;
- // Record various errors found during attempts to record histograms.
- virtual void InconsistencyDetected(int problem) = 0;
- virtual void UniqueInconsistencyDetected(int problem) = 0;
- virtual void SnapshotProblemResolved(int amount) = 0;
+ // Will be called each time a type of Inconsistenies is seen on a histogram,
+ // during inspections done internally in HistogramSnapshotManager class.
+ virtual void InconsistencyDetected(Histogram::Inconsistencies problem) = 0;
+ // Will be called when a type of Inconsistenies is seen for the first time
+ // on a histogram.
+ virtual void UniqueInconsistencyDetected(
+ Histogram::Inconsistencies problem) = 0;
+
+ // Will be called when the total logged sample count of a histogram
+ // differs from the sum of logged sample count in all the buckets. The
+ // argument |amount| is the non-zero discrepancy.
+ virtual void InconsistencyDetectedInLoggedCount(int amount) = 0;
+
protected:
HistogramFlattener() {}
virtual ~HistogramFlattener() {}
« no previous file with comments | « no previous file | base/metrics/histogram_snapshot_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698