From 1d783fbf39c12e3396286d1eb898dcc0a7692e80 Mon Sep 17 00:00:00 2001 From: "bcwhite@chromium.org" Date: Thu, 1 May 2014 04:30:17 +0000 Subject: Guest profiles need to open new windows as Incognito. BUG=365772 Review URL: https://codereview.chromium.org/248733003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267429 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/ui/browser_commands.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'chrome/browser/ui/browser_commands.cc') diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc index c040b28..6216d5a 100644 --- a/chrome/browser/ui/browser_commands.cc +++ b/chrome/browser/ui/browser_commands.cc @@ -336,12 +336,11 @@ void NewEmptyWindow(Profile* profile, HostDesktopType desktop_type) { IncognitoModePrefs::DISABLED) { incognito = false; } - } else { - if (browser_defaults::kAlwaysOpenIncognitoWindow && - IncognitoModePrefs::ShouldLaunchIncognito( - *CommandLine::ForCurrentProcess(), prefs)) { - incognito = true; - } + } else if (profile->IsGuestSession() || + (browser_defaults::kAlwaysOpenIncognitoWindow && + IncognitoModePrefs::ShouldLaunchIncognito( + *CommandLine::ForCurrentProcess(), prefs))) { + incognito = true; } if (incognito) { -- cgit v1.1