| Index: components/metrics/metrics_service.cc
|
| diff --git a/components/metrics/metrics_service.cc b/components/metrics/metrics_service.cc
|
| index cad15984141323b821d374be362e103287d88dc8..7313cc32e1a6113e9dc83551d0de3b83bef1346d 100644
|
| --- a/components/metrics/metrics_service.cc
|
| +++ b/components/metrics/metrics_service.cc
|
| @@ -469,6 +469,11 @@ void MetricsService::OnAppEnterBackground() {
|
|
|
| MarkAppCleanShutdownAndCommit(&clean_exit_beacon_, local_state_);
|
|
|
| + // Give providers a chance to persist histograms as part of being
|
| + // backgrounded.
|
| + for (MetricsProvider* provider : metrics_providers_)
|
| + provider->OnAppEnterBackground();
|
| +
|
| // At this point, there's no way of knowing when the process will be
|
| // killed, so this has to be treated similar to a shutdown, closing and
|
| // persisting all logs. Unlinke a shutdown, the state is primed to be ready
|
|
|