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); |