Index: chrome/browser/ui/browser_init.cc |
diff --git a/chrome/browser/ui/browser_init.cc b/chrome/browser/ui/browser_init.cc |
index b1dd2dbe7f4c90a213a8ffc5f0ef9c656792c901..87c15a1a7219f0eab773c6663bcbbc0b0deac488 100644 |
--- a/chrome/browser/ui/browser_init.cc |
+++ b/chrome/browser/ui/browser_init.cc |
@@ -332,9 +332,12 @@ bool IncognitoIsForced(const CommandLine& command_line, |
SessionStartupPref GetSessionStartupPref(const CommandLine& command_line, |
Profile* profile) { |
+ PrefService* pref_service = g_browser_process->local_state(); |
SessionStartupPref pref = SessionStartupPref::GetStartupPref(profile); |
- if (command_line.HasSwitch(switches::kRestoreLastSession)) |
+ if (command_line.HasSwitch(switches::kRestoreLastSession) || |
+ pref_service->GetBoolean(prefs::kWasRestarted)) { |
pref.type = SessionStartupPref::LAST; |
+ } |
if (pref.type == SessionStartupPref::LAST && |
IncognitoIsForced(command_line, profile->GetPrefs())) { |
// We don't store session information when incognito. If the user has |