Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Unified Diff: components/metrics/metrics_service.cc

Issue 1036593005: Stop calling CommitPendingWriter() in LogCleanShutdown(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/metrics/metrics_service.cc
diff --git a/components/metrics/metrics_service.cc b/components/metrics/metrics_service.cc
index 2a321e0ccfd6a9849cafee125246a86c58203b68..60a3f309a48e1f870afff2a03f51b7c6e99eb06d 100644
--- a/components/metrics/metrics_service.cc
+++ b/components/metrics/metrics_service.cc
@@ -209,6 +209,7 @@ ResponseStatus ResponseCodeToStatus(int response_code) {
}
}
+#if defined(OS_ANDROID) || defined(OS_IOS)
void MarkAppCleanShutdownAndCommit(CleanExitBeacon* clean_exit_beacon,
PrefService* local_state) {
clean_exit_beacon->WriteBeaconValue(true);
@@ -217,6 +218,7 @@ void MarkAppCleanShutdownAndCommit(CleanExitBeacon* clean_exit_beacon,
// Start writing right away (write happens on a different thread).
local_state->CommitPendingWrite();
}
+#endif // defined(OS_ANDROID) || defined(OS_IOS)
} // namespace
@@ -1088,9 +1090,6 @@ void MetricsService::RecordCurrentStabilityHistograms() {
}
void MetricsService::LogCleanShutdown() {
- // Redundant hack to write pref ASAP.
- MarkAppCleanShutdownAndCommit(&clean_exit_beacon_, local_state_);
-
// 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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698