summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/ui/browser_commands.cc11
1 files changed, 5 insertions, 6 deletions
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) {