| Index: components/metrics/metrics_service.cc
|
| diff --git a/components/metrics/metrics_service.cc b/components/metrics/metrics_service.cc
|
| index cc0e457e51e4199da6983a516c97ac5af987fe6e..12fc4084ba9fc5a384a0e0e7fc8b162201158d3e 100644
|
| --- a/components/metrics/metrics_service.cc
|
| +++ b/components/metrics/metrics_service.cc
|
| @@ -446,13 +446,11 @@ void MetricsService::OnApplicationNotIdle() {
|
| }
|
|
|
| void MetricsService::RecordStartOfSessionEnd() {
|
| - LogCleanShutdown();
|
| - RecordBooleanPrefValue(prefs::kStabilitySessionEndCompleted, false);
|
| + LogCleanShutdown(false);
|
| }
|
|
|
| void MetricsService::RecordCompletedSessionEnd() {
|
| - LogCleanShutdown();
|
| - RecordBooleanPrefValue(prefs::kStabilitySessionEndCompleted, true);
|
| + LogCleanShutdown(true);
|
| }
|
|
|
| #if defined(OS_ANDROID) || defined(OS_IOS)
|
| @@ -1209,7 +1207,8 @@ void MetricsService::RecordCurrentStabilityHistograms() {
|
| provider->RecordInitialHistogramSnapshots(&histogram_snapshot_manager_);
|
| }
|
|
|
| -void MetricsService::LogCleanShutdown() {
|
| +void MetricsService::LogCleanShutdown(bool end_completed) {
|
| + DCHECK(IsSingleThreaded());
|
| // Redundant setting to assure that we always reset this value at shutdown
|
| // (and that we don't use some alternate path, and not call LogCleanShutdown).
|
| clean_shutdown_status_ = CLEANLY_SHUTDOWN;
|
| @@ -1217,11 +1216,7 @@ void MetricsService::LogCleanShutdown() {
|
| clean_exit_beacon_.WriteBeaconValue(true);
|
| RecordCurrentState(local_state_);
|
| SetExecutionPhase(MetricsService::SHUTDOWN_COMPLETE, local_state_);
|
| -}
|
| -
|
| -void MetricsService::RecordBooleanPrefValue(const char* path, bool value) {
|
| - DCHECK(IsSingleThreaded());
|
| - local_state_->SetBoolean(path, value);
|
| + local_state_->SetBoolean(prefs::kStabilitySessionEndCompleted, end_completed);
|
| RecordCurrentState(local_state_);
|
| }
|
|
|
|
|