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

Unified Diff: chrome/browser/ui/browser_init.cc

Issue 6399001: Revert 72624 (due to crashes) - Implement pref policy for disabling incognito... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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 | « chrome/browser/ui/browser.cc ('k') | chrome/common/policy_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/common/policy_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698