summaryrefslogtreecommitdiffstats
path: root/chrome/browser/app_controller_mac.mm
diff options
context:
space:
mode:
authormlerman@chromium.org <mlerman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-24 04:01:13 +0000
committermlerman@chromium.org <mlerman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-24 04:01:13 +0000
commit5595ce6d15d86253c69a238799e2035ce367d49e (patch)
tree6a22fa7440b3c2f829dad8c3c9e0966d50ce5aa3 /chrome/browser/app_controller_mac.mm
parentdc329e3b770fc1115d4491c18a622e109ab816dd (diff)
downloadchromium_src-5595ce6d15d86253c69a238799e2035ce367d49e.zip
chromium_src-5595ce6d15d86253c69a238799e2035ce367d49e.tar.gz
chromium_src-5595ce6d15d86253c69a238799e2035ce367d49e.tar.bz2
Ensure guest mode browser can activate the correct window.
BUG=363047 TEST=Open a browser in guest mode on Mac. Open Preferences, chrome://settings should open in the same browser. Review URL: https://codereview.chromium.org/411573002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285151 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/app_controller_mac.mm')
-rw-r--r--chrome/browser/app_controller_mac.mm3
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index f46a189..57fb281 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -123,7 +123,8 @@ bool g_is_opening_new_window = false;
// not possible. If the last active browser is minimized (in particular, if
// there are only minimized windows), it will unminimize it.
Browser* ActivateBrowser(Profile* profile) {
- Browser* browser = chrome::FindLastActiveWithProfile(profile,
+ Browser* browser = chrome::FindLastActiveWithProfile(
+ profile->IsGuestSession() ? profile->GetOffTheRecordProfile() : profile,
chrome::HOST_DESKTOP_TYPE_NATIVE);
if (browser)
browser->window()->Activate();