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

Unified Diff: chrome/browser/profiles/profile_impl.cc

Issue 8745015: Store the "browser autorestarted, last session must be restored" information in a preference. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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
Index: chrome/browser/profiles/profile_impl.cc
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index 7bc0df943205aaebea39ce2af59d36339b778a0b..af93fce0e8fa18a847d31119d075e1c927248fb0 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -367,11 +367,13 @@ void ProfileImpl::DoFinalInit() {
FilePath app_path = GetPath().Append(chrome::kIsolatedAppStateDirname);
+ PrefService* pref_service = g_browser_process->local_state();
bool restore_old_session_cookies =
session_restore_enabled_ &&
(!DidLastSessionExitCleanly() ||
CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kRestoreLastSession));
+ switches::kRestoreLastSession) ||
+ pref_service->GetBoolean(prefs::kWasRestarted));
// Make sure we initialize the ProfileIOData after everything else has been
// initialized that we might be reading from the IO thread.

Powered by Google App Engine
This is Rietveld 408576698