| Index: chrome/browser/ui/ash/chrome_new_window_delegate.cc
|
| diff --git a/chrome/browser/ui/ash/chrome_new_window_delegate.cc b/chrome/browser/ui/ash/chrome_new_window_delegate.cc
|
| index b0689d930f5b07ff3f3eee30d5140840df67f8e0..dd08fa5844bb3d06bd8a9ca8d654d4de1ac097c8 100644
|
| --- a/chrome/browser/ui/ash/chrome_new_window_delegate.cc
|
| +++ b/chrome/browser/ui/ash/chrome_new_window_delegate.cc
|
| @@ -97,7 +97,10 @@ void ChromeNewWindowDelegate::NewTab() {
|
| }
|
|
|
| void ChromeNewWindowDelegate::NewWindow(bool is_incognito) {
|
| - Profile* profile = ProfileManager::GetActiveUserProfile();
|
| + Browser* browser = GetBrowserForActiveWindow();
|
| + Profile* profile = (browser && browser->profile())
|
| + ? browser->profile()->GetOriginalProfile()
|
| + : ProfileManager::GetActiveUserProfile();
|
| chrome::NewEmptyWindow(is_incognito ? profile->GetOffTheRecordProfile()
|
| : profile);
|
| }
|
|
|