summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbcwhite@chromium.org <bcwhite@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-01 04:30:17 +0000
committerbcwhite@chromium.org <bcwhite@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-01 04:30:17 +0000
commit1d783fbf39c12e3396286d1eb898dcc0a7692e80 (patch)
tree9b7b8ad604af4c616b88971ab5ee5545d7bab458
parent2ad1f47898bde960fe4a23e2136102f8b516f62e (diff)
downloadchromium_src-1d783fbf39c12e3396286d1eb898dcc0a7692e80.zip
chromium_src-1d783fbf39c12e3396286d1eb898dcc0a7692e80.tar.gz
chromium_src-1d783fbf39c12e3396286d1eb898dcc0a7692e80.tar.bz2
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
-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) {