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

Unified Diff: chrome/browser/chromeos/cros/login_library.cc

Issue 6710001: Enforce SavePersistentPrefs in RestartJob path. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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: chrome/browser/chromeos/cros/login_library.cc
diff --git a/chrome/browser/chromeos/cros/login_library.cc b/chrome/browser/chromeos/cros/login_library.cc
index cd640e0b510c6e34efc98f950b53edd0f7f9d7a3..026757f3b92226b9bdf99ae76e2eb3993e401f2f 100644
--- a/chrome/browser/chromeos/cros/login_library.cc
+++ b/chrome/browser/chromeos/cros/login_library.cc
@@ -8,6 +8,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chromeos/cros/cros_library.h"
#include "chrome/browser/chromeos/login/signed_settings_temp_storage.h"
+#include "chrome/browser/prefs/pref_service.h"
#include "content/browser/browser_thread.h"
#include "content/common/notification_service.h"
#include "content/common/notification_type.h"
@@ -130,6 +131,12 @@ class LoginLibraryImpl : public LoginLibrary {
}
bool RestartJob(int pid, const std::string& command_line) {
+ if (g_browser_process && g_browser_process->local_state()) {
+ // XXX: normally this call must not be needed, however it turned out that
Nikita (slow) 2011/03/17 16:04:40 Please comment in this one too http://code.google.
+ // without this explicit call to SavePersistentPrefs it is possible for
+ // preferences to be lost. See http://crosbug.com/13102
+ g_browser_process->local_state()->SavePersistentPrefs();
+ }
return chromeos::RestartJob(pid, command_line.c_str());
}
« 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