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

Unified Diff: base/metrics/histogram_snapshot_manager.cc

Issue 12207058: Connect SparseHistogram with the rest of stats system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 10 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_snapshot_manager.h ('k') | base/metrics/histogram_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/histogram_snapshot_manager.cc
diff --git a/base/metrics/histogram_snapshot_manager.cc b/base/metrics/histogram_snapshot_manager.cc
index ad054b1003c07e4d2cb862b8f29b9c640b2f8fdd..2301819ad30685fb3d36515cb4e45d3398e8dcef 100644
--- a/base/metrics/histogram_snapshot_manager.cc
+++ b/base/metrics/histogram_snapshot_manager.cc
@@ -25,7 +25,7 @@ HistogramSnapshotManager::~HistogramSnapshotManager() {
STLDeleteValues(&logged_samples_);
}
-void HistogramSnapshotManager::PrepareDeltas(Histogram::Flags flag_to_set,
+void HistogramSnapshotManager::PrepareDeltas(HistogramBase::Flags flag_to_set,
bool record_only_uma) {
StatisticsRecorder::Histograms histograms;
StatisticsRecorder::GetHistograms(&histograms);
@@ -40,7 +40,7 @@ void HistogramSnapshotManager::PrepareDeltas(Histogram::Flags flag_to_set,
}
}
-void HistogramSnapshotManager::PrepareDelta(const Histogram& histogram) {
+void HistogramSnapshotManager::PrepareDelta(const HistogramBase& histogram) {
DCHECK(histogram_flattener_);
// Get up-to-date snapshot of sample stats.
@@ -52,13 +52,13 @@ void HistogramSnapshotManager::PrepareDelta(const Histogram& histogram) {
// Crash if we detect that our histograms have been overwritten. This may be
// a fair distance from the memory smasher, but we hope to correlate these
// crashes with other events, such as plugins, or usage patterns, etc.
- if (Histogram::BUCKET_ORDER_ERROR & corruption) {
+ if (HistogramBase::BUCKET_ORDER_ERROR & corruption) {
// The checksum should have caught this, so crash separately if it didn't.
- CHECK_NE(0, Histogram::RANGE_CHECKSUM_ERROR & corruption);
+ CHECK_NE(0, HistogramBase::RANGE_CHECKSUM_ERROR & corruption);
CHECK(false); // Crash for the bucket order corruption.
}
// Checksum corruption might not have caused order corruption.
- CHECK_EQ(0, Histogram::RANGE_CHECKSUM_ERROR & corruption);
+ CHECK_EQ(0, HistogramBase::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
@@ -67,14 +67,14 @@ void HistogramSnapshotManager::PrepareDelta(const Histogram& histogram) {
DLOG(ERROR) << "Histogram: " << histogram_name
<< " has data corruption: " << corruption;
histogram_flattener_->InconsistencyDetected(
- static_cast<Histogram::Inconsistencies>(corruption));
+ static_cast<HistogramBase::Inconsistency>(corruption));
// Don't record corrupt data to metrics services.
int old_corruption = inconsistencies_[histogram_name];
if (old_corruption == (corruption | old_corruption))
return; // We've already seen this corruption for this histogram.
inconsistencies_[histogram_name] |= corruption;
histogram_flattener_->UniqueInconsistencyDetected(
- static_cast<Histogram::Inconsistencies>(corruption));
+ static_cast<HistogramBase::Inconsistency>(corruption));
return;
}
« no previous file with comments | « base/metrics/histogram_snapshot_manager.h ('k') | base/metrics/histogram_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698