Index: components/metrics/metrics_service.cc |
diff --git a/components/metrics/metrics_service.cc b/components/metrics/metrics_service.cc |
index 7e31ddb93156bf301ef333bd5cbe71bb7acc9691..e3b33c15c437c1620c467844c6fef3193f200daf 100644 |
--- a/components/metrics/metrics_service.cc |
+++ b/components/metrics/metrics_service.cc |
@@ -1155,11 +1155,19 @@ void MetricsService::RecordCurrentHistograms() { |
void MetricsService::RecordCurrentStabilityHistograms() { |
DCHECK(log_manager_.current_log()); |
+ histogram_snapshot_manager_.StartDeltas(); |
// "true" indicates that StatisticsRecorder should include histograms in |
// persistent storage. |
- histogram_snapshot_manager_.PrepareDeltas( |
- base::StatisticsRecorder::begin(true), base::StatisticsRecorder::end(), |
- base::Histogram::kNoFlags, base::Histogram::kUmaStabilityHistogramFlag); |
+ auto end = base::StatisticsRecorder::end(); |
+ for (auto it = base::StatisticsRecorder::begin(true); it != end; ++it) { |
+ if (((*it)->flags() & base::Histogram::kUmaStabilityHistogramFlag) == |
+ base::Histogram::kUmaStabilityHistogramFlag) { |
+ histogram_snapshot_manager_.PrepareDelta(*it); |
+ } |
+ } |
+ for (MetricsProvider* provider : metrics_providers_) |
+ provider->RecordStabilityHistogramSnapshots(&histogram_snapshot_manager_); |
Ilya Sherman
2016/05/04 06:48:08
This doesn't seem like the right place to add this
bcwhite
2016/05/04 14:12:51
Correct. This method is called only from PrepareI
|
+ histogram_snapshot_manager_.FinishDeltas(); |
} |
void MetricsService::LogCleanShutdown() { |