| Index: chrome/browser/extensions/extension_install_ui.cc
|
| diff --git a/chrome/browser/extensions/extension_install_ui.cc b/chrome/browser/extensions/extension_install_ui.cc
|
| index 2f1efd5039644cac91196e62f75da7d02cef0f25..71c74088dfdfbe837f45ffc7a1a815e9af9d1098 100644
|
| --- a/chrome/browser/extensions/extension_install_ui.cc
|
| +++ b/chrome/browser/extensions/extension_install_ui.cc
|
| @@ -128,10 +128,15 @@ void ExtensionInstallUI::OnInstallSuccess(const Extension* extension) {
|
| return;
|
| }
|
|
|
| - // GetLastActiveWithProfile will fail on the build bots. This needs to be
|
| - // implemented differently if any test is created which depends on
|
| - // ExtensionInstalledBubble showing.
|
| - Browser* browser = BrowserList::GetLastActiveWithProfile(profile_);
|
| + // Note that browser actions don't appear in incognito mode initially,
|
| + // so be sure to use a normal browser window.
|
| + Profile* profile = profile_;
|
| + if (extension->browser_action())
|
| + profile = profile->GetOriginalProfile();
|
| + Browser* browser = Browser::GetOrCreateTabbedBrowser(profile);
|
| + if (browser->tab_count() == 0)
|
| + browser->AddBlankTab(true);
|
| + browser->window()->Show();
|
|
|
| if (extension->GetFullLaunchURL().is_valid()) {
|
| std::string hash_params = "app-id=";
|
|
|