Commit a5c00e28 authored by hashimoto's avatar hashimoto Committed by Commit bot

Stop calling CommitPendingWriter() in LogCleanShutdown().

PrefService's dtor is responsible to call CommitPendingWrite() so there is no need to call it here.

BUG=470501

Review URL: https://codereview.chromium.org/1036593005

Cr-Commit-Position: refs/heads/master@{#322535}
parent 50410919
...@@ -209,6 +209,7 @@ ResponseStatus ResponseCodeToStatus(int response_code) { ...@@ -209,6 +209,7 @@ ResponseStatus ResponseCodeToStatus(int response_code) {
} }
} }
#if defined(OS_ANDROID) || defined(OS_IOS)
void MarkAppCleanShutdownAndCommit(CleanExitBeacon* clean_exit_beacon, void MarkAppCleanShutdownAndCommit(CleanExitBeacon* clean_exit_beacon,
PrefService* local_state) { PrefService* local_state) {
clean_exit_beacon->WriteBeaconValue(true); clean_exit_beacon->WriteBeaconValue(true);
...@@ -217,6 +218,7 @@ void MarkAppCleanShutdownAndCommit(CleanExitBeacon* clean_exit_beacon, ...@@ -217,6 +218,7 @@ void MarkAppCleanShutdownAndCommit(CleanExitBeacon* clean_exit_beacon,
// Start writing right away (write happens on a different thread). // Start writing right away (write happens on a different thread).
local_state->CommitPendingWrite(); local_state->CommitPendingWrite();
} }
#endif // defined(OS_ANDROID) || defined(OS_IOS)
} // namespace } // namespace
...@@ -1088,9 +1090,6 @@ void MetricsService::RecordCurrentStabilityHistograms() { ...@@ -1088,9 +1090,6 @@ void MetricsService::RecordCurrentStabilityHistograms() {
} }
void MetricsService::LogCleanShutdown() { 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 // 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). // (and that we don't use some alternate path, and not call LogCleanShutdown).
clean_shutdown_status_ = CLEANLY_SHUTDOWN; clean_shutdown_status_ = CLEANLY_SHUTDOWN;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment