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

Unified Diff: chrome/browser/metrics/metrics_service.cc

Issue 8198007: Remove PrefService::ScheduleSavePersistentPrefs and SavePersistentPrefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 9 years 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 | « chrome/browser/importer/profile_writer.cc ('k') | chrome/browser/prefs/overlay_user_pref_store.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/metrics_service.cc
diff --git a/chrome/browser/metrics/metrics_service.cc b/chrome/browser/metrics/metrics_service.cc
index e034a3033ae969de55ee5f01cb440c317a1b134f..3fda3d4aa2ea36b424d92e534ef0e61e3e46dc09 100644
--- a/chrome/browser/metrics/metrics_service.cc
+++ b/chrome/browser/metrics/metrics_service.cc
@@ -777,7 +777,6 @@ void MetricsService::SaveLocalState() {
}
RecordCurrentState(pref);
- pref->ScheduleSavePersistentPrefs();
// TODO(jar): Does this run down the batteries????
ScheduleNextStateSave();
@@ -1132,11 +1131,6 @@ void MetricsService::OnURLFetchComplete(const content::URLFetcher* source) {
}
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 @@ void MetricsService::LogCleanShutdown() {
// 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
« no previous file with comments | « chrome/browser/importer/profile_writer.cc ('k') | chrome/browser/prefs/overlay_user_pref_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698