diff options
author | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-30 19:00:27 +0000 |
---|---|---|
committer | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-30 19:00:27 +0000 |
commit | a38b3b5ed715dcf37adabaf8632baf26efdce8a0 (patch) | |
tree | eec82c68ea3c40ac3c6b687a6e27f347fa99f5cc /chrome/browser/extensions | |
parent | 890129d018b1ee12ac210751ee6a4440a268cb9b (diff) | |
download | chromium_src-a38b3b5ed715dcf37adabaf8632baf26efdce8a0.zip chromium_src-a38b3b5ed715dcf37adabaf8632baf26efdce8a0.tar.gz chromium_src-a38b3b5ed715dcf37adabaf8632baf26efdce8a0.tar.bz2 |
Fix a regression with chrome.tabs.create() with a chrome-extension URL when
only an incognito window was visible.
BUG=41087
Review URL: http://codereview.chromium.org/2881004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51283 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions')
-rw-r--r-- | chrome/browser/extensions/extension_tabs_module.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc index fbfb957..36ada09 100644 --- a/chrome/browser/extensions/extension_tabs_module.cc +++ b/chrome/browser/extensions/extension_tabs_module.cc @@ -556,9 +556,13 @@ bool CreateTabFunction::RunImpl() { // fall back to a normal window. if (url.SchemeIs(chrome::kExtensionScheme) && browser->profile()->IsOffTheRecord()) { - browser = Browser::GetOrCreateTabbedBrowser( - browser->profile()->GetOriginalProfile()); - DCHECK(browser); + Profile* profile = browser->profile()->GetOriginalProfile(); + browser = BrowserList::FindBrowserWithType(profile, + Browser::TYPE_NORMAL, false); + if (!browser) { + browser = Browser::Create(profile); + browser->window()->Show(); + } } TabStripModel* tab_strip = browser->tabstrip_model(); |