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

Unified Diff: chrome/browser/ui/extensions/extension_install_ui_default.cc

Issue 168823004: Fix crash with --load-extension for extensions with plugins (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unit_tests (load_extension_crash) Created 6 years, 10 months 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 | « chrome/browser/extensions/unpacked_installer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/extensions/extension_install_ui_default.cc
diff --git a/chrome/browser/ui/extensions/extension_install_ui_default.cc b/chrome/browser/ui/extensions/extension_install_ui_default.cc
index d72036c1774c97fb1a5bc1c254cc720fdf91048c..6fa1d4a5e1bff8739511736822e38f04de6bc3d1 100644
--- a/chrome/browser/ui/extensions/extension_install_ui_default.cc
+++ b/chrome/browser/ui/extensions/extension_install_ui_default.cc
@@ -191,7 +191,11 @@ ExtensionInstallPrompt* ExtensionInstallUI::CreateInstallPromptWithProfile(
Profile* profile) {
Browser* browser = chrome::FindLastActiveWithProfile(profile,
chrome::GetActiveDesktop());
- return CreateInstallPromptWithBrowser(browser);
+ if (browser)
+ return CreateInstallPromptWithBrowser(browser);
+ // No browser window is open yet. Create a free-standing dialog associated
+ // with |profile|.
+ return new ExtensionInstallPrompt(profile, NULL, NULL);
}
« no previous file with comments | « chrome/browser/extensions/unpacked_installer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698