Remove PrefService::ScheduleSavePersistentPrefs and change SavePersistentPrefs calls to CommitPendingWrites.
[email protected]
BUG=99306
TEST=none
Review URL: http://codereview.chromium.org/8198007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115829 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/metrics/metrics_service.cc b/chrome/browser/metrics/metrics_service.cc
index e034a30..3fda3d4 100644
--- a/chrome/browser/metrics/metrics_service.cc
+++ b/chrome/browser/metrics/metrics_service.cc
@@ -777,7 +777,6 @@
}
RecordCurrentState(pref);
- pref->ScheduleSavePersistentPrefs();
// TODO(jar): Does this run down the batteries????
ScheduleNextStateSave();
@@ -1132,11 +1131,6 @@
}
log_manager_.DiscardStagedLog();
- // Since we sent a log, make sure our in-memory state is recorded to disk.
- PrefService* local_state = g_browser_process->local_state();
- DCHECK(local_state);
- if (local_state)
- local_state->ScheduleSavePersistentPrefs();
if (log_manager_.has_unsent_logs())
DCHECK(state_ < SENDING_CURRENT_LOGS);
@@ -1304,7 +1298,7 @@
// Redundant hack to write pref ASAP.
PrefService* pref = g_browser_process->local_state();
pref->SetBoolean(prefs::kStabilityExitedCleanly, true);
- pref->SavePersistentPrefs();
+ pref->CommitPendingWrite();
// Hack: TBD: Remove this wait.
// We are so concerned that the pref gets written, we are now willing to stall
// the UI thread until we get assurance that a pref-writing task has