Index: chrome/browser/ui/browser_init.cc |
=================================================================== |
--- chrome/browser/ui/browser_init.cc (revision 72629) |
+++ chrome/browser/ui/browser_init.cc (working copy) |
@@ -370,8 +370,7 @@ |
if (command_line.HasSwitch(switches::kRestoreLastSession)) |
pref.type = SessionStartupPref::LAST; |
if (command_line.HasSwitch(switches::kIncognito) && |
- pref.type == SessionStartupPref::LAST && |
- profile->GetPrefs()->GetBoolean(prefs::kIncognitoEnabled)) { |
+ pref.type == SessionStartupPref::LAST) { |
// We don't store session information when incognito. If the user has |
// chosen to restore last session and launched incognito, fallback to |
// default launch behavior. |
@@ -485,10 +484,8 @@ |
#endif |
// Continue with the off-the-record profile from here on if --incognito |
- if (command_line.HasSwitch(switches::kIncognito) && |
- profile->GetPrefs()->GetBoolean(prefs::kIncognitoEnabled)) { |
+ if (command_line.HasSwitch(switches::kIncognito)) |
profile = profile->GetOffTheRecordProfile(); |
- } |
BrowserInit::LaunchWithProfile lwp(cur_dir, command_line, this); |
bool launched = lwp.Launch(profile, process_startup); |