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

Unified Diff: base/metrics/histogram_snapshot_manager.cc

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 | « base/metrics/histogram_flattener.h ('k') | chrome/common/metrics/metrics_service_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/histogram_snapshot_manager.cc
===================================================================
--- base/metrics/histogram_snapshot_manager.cc (revision 151415)
+++ base/metrics/histogram_snapshot_manager.cc (working copy)
@@ -64,9 +64,13 @@
// Checksum corruption might not have caused order corruption.
CHECK_EQ(0, Histogram::RANGE_CHECKSUM_ERROR & corruption);
+ // Note, at this point corruption can only be COUNT_HIGH_ERROR or
+ // COUNT_LOW_ERROR and they never arise together, so we don't need to extract
+ // bits from corruption.
if (corruption) {
NOTREACHED();
- histogram_flattener_->InconsistencyDetected(corruption);
+ histogram_flattener_->InconsistencyDetected(
+ static_cast<Histogram::Inconsistencies>(corruption));
// Don't record corrupt data to metrics survices.
if (NULL == inconsistencies_.get())
inconsistencies_.reset(new ProblemMap);
@@ -74,7 +78,8 @@
if (old_corruption == (corruption | old_corruption))
return; // We've already seen this corruption for this histogram.
(*inconsistencies_)[histogram_name] |= corruption;
- histogram_flattener_->UniqueInconsistencyDetected(corruption);
+ histogram_flattener_->UniqueInconsistencyDetected(
+ static_cast<Histogram::Inconsistencies>(corruption));
return;
}
@@ -96,7 +101,7 @@
int problem = static_cast<int>(discrepancy);
if (problem != discrepancy)
problem = INT_MAX;
- histogram_flattener_->SnapshotProblemResolved(problem);
+ histogram_flattener_->InconsistencyDetectedInLoggedCount(problem);
// With no valid baseline, we'll act like we've recorded everything in our
// snapshot.
already_logged->Subtract(*already_logged);
« no previous file with comments | « base/metrics/histogram_flattener.h ('k') | chrome/common/metrics/metrics_service_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698