| Index: components/metrics/metrics_service.cc
|
| diff --git a/components/metrics/metrics_service.cc b/components/metrics/metrics_service.cc
|
| index 7e31ddb93156bf301ef333bd5cbe71bb7acc9691..e1ed8d0093cc7588af8632c5ed492b9fc18ab419 100644
|
| --- a/components/metrics/metrics_service.cc
|
| +++ b/components/metrics/metrics_service.cc
|
| @@ -1155,11 +1155,23 @@ 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);
|
| + for (auto it = base::StatisticsRecorder::begin(true),
|
| + end = base::StatisticsRecorder::end();
|
| + it != end; ++it) {
|
| + // kUmaStabilityHistogramFlag is actually a combination of two flags and
|
| + // so the result of the bitwise-and must be checked against the "flag"
|
| + // value or incorrect matches will occur.
|
| + if (((*it)->flags() & base::Histogram::kUmaStabilityHistogramFlag) ==
|
| + base::Histogram::kUmaStabilityHistogramFlag) {
|
| + histogram_snapshot_manager_.PrepareDelta(*it);
|
| + }
|
| + }
|
| + for (MetricsProvider* provider : metrics_providers_)
|
| + provider->RecordInitialHistogramSnapshots(&histogram_snapshot_manager_);
|
| + histogram_snapshot_manager_.FinishDeltas();
|
| }
|
|
|
| void MetricsService::LogCleanShutdown() {
|
|
|