Index: components/metrics/metrics_service.cc |
diff --git a/components/metrics/metrics_service.cc b/components/metrics/metrics_service.cc |
index 7e31ddb93156bf301ef333bd5cbe71bb7acc9691..a0a5658f2cd3652014dc07a0f8af9ac5aa263d82 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(); |
Ilya Sherman
2016/05/05 07:22:37
nit: Please move this so that it's scoped to withi
bcwhite
2016/05/05 16:01:17
Done.
|
+ 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->RecordInitialHistogramSnapshots(&histogram_snapshot_manager_); |
Ilya Sherman
2016/05/05 07:22:37
Providers might choose to include metrics that are
bcwhite
2016/05/05 16:01:17
You mean on line 1163? That's always been there a
Ilya Sherman
2016/05/05 22:22:52
Ah, I was misreading the code. Thanks for explain
|
+ histogram_snapshot_manager_.FinishDeltas(); |
} |
void MetricsService::LogCleanShutdown() { |