Index: base/metrics/histogram_snapshot_manager.cc |
diff --git a/base/metrics/histogram_snapshot_manager.cc b/base/metrics/histogram_snapshot_manager.cc |
index e21d512daba271dc43248a9e63b598ce98d55472..dc6cb8a86ed62c97cce03ecb5cc88676ba1b4282 100644 |
--- a/base/metrics/histogram_snapshot_manager.cc |
+++ b/base/metrics/histogram_snapshot_manager.cc |
@@ -31,11 +31,12 @@ void HistogramSnapshotManager::StartDeltas() { |
DCHECK(owned_histograms_.empty()); |
-#ifdef DEBUG |
- CHECK(!iter->second.histogram); |
- CHECK(!iter->second.accumulated_samples); |
- CHECK(!(iter->second.inconsistencies & |
- HistogramBase::NEW_INCONSISTENCY_FOUND)); |
+#if DCHECK_IS_ON() |
+ for (const auto& hash_and_info : known_histograms_) { |
+ DCHECK(!hash_and_info.second.histogram); |
+ DCHECK(!hash_and_info.second.accumulated_samples); |
+ DCHECK(!(hash_and_info.second.inconsistencies & |
+ HistogramBase::NEW_INCONSISTENCY_FOUND)); |
} |
#endif |
} |
@@ -60,6 +61,12 @@ void HistogramSnapshotManager::PrepareAbsoluteTakingOwnership( |
owned_histograms_.push_back(std::move(histogram)); |
} |
+void HistogramSnapshotManager::PrepareFinalDeltaTakingOwnership( |
+ std::unique_ptr<const HistogramBase> histogram) { |
+ PrepareSamples(histogram.get(), histogram->SnapshotFinalDelta()); |
+ owned_histograms_.push_back(std::move(histogram)); |
+} |
+ |
void HistogramSnapshotManager::FinishDeltas() { |
DCHECK(preparing_deltas_); |