Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1205)

Unified Diff: chrome/browser/extensions/extension_install_ui.cc

Issue 5208001: Fix a bug where installing an extension in incognito would not show the help (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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=";
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698