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 eff9b8a23fb31632bacfa588ce0ad04ae313d236..5c7e5e1c0f4efd374bf046cf9c7254d6261fefad 100644 |
--- a/chrome/browser/ui/extensions/extension_install_ui_default.cc |
+++ b/chrome/browser/ui/extensions/extension_install_ui_default.cc |
@@ -70,30 +70,6 @@ void ShowExtensionInstalledBubble(const extensions::Extension* extension, |
chrome::ShowExtensionInstalledBubble(extension, browser, icon); |
} |
-void OnAppLauncherEnabledCompleted(const extensions::Extension* extension, |
- Profile* profile, |
- SkBitmap* icon, |
- bool use_bubble, |
- bool use_launcher) { |
- if (use_launcher) { |
- AppListService::Get()->ShowAppList(profile); |
- |
- content::NotificationService::current()->Notify( |
- chrome::NOTIFICATION_APP_INSTALLED_TO_APPLIST, |
- content::Source<Profile>(profile), |
- content::Details<const std::string>(&extension->id())); |
- return; |
- } |
- |
- if (use_bubble) { |
- ShowExtensionInstalledBubble(extension, profile, *icon); |
- return; |
- } |
- |
- ExtensionInstallUI::OpenAppInstalledUI(profile, extension->id()); |
-} |
- |
- |
// ErrorInfobarDelegate ------------------------------------------------------- |
// Helper class to put up an infobar when installation fails. |
@@ -265,9 +241,22 @@ void ExtensionInstallUIDefault::OnInstallSuccess(const Extension* extension, |
cmdline->HasSwitch(switches::kAppsNewInstallBubble)); |
#endif |
- apps::GetIsAppLauncherEnabled( |
- base::Bind(&OnAppLauncherEnabledCompleted, extension, current_profile, |
- icon, use_bubble)); |
+ if (apps::IsAppLauncherEnabled()) { |
+ AppListService::Get()->ShowAppList(current_profile); |
+ |
+ content::NotificationService::current()->Notify( |
+ chrome::NOTIFICATION_APP_INSTALLED_TO_APPLIST, |
+ content::Source<Profile>(current_profile), |
+ content::Details<const std::string>(&extension->id())); |
+ return; |
+ } |
+ |
+ if (use_bubble) { |
+ ShowExtensionInstalledBubble(extension, current_profile, *icon); |
+ return; |
+ } |
+ |
+ ExtensionInstallUI::OpenAppInstalledUI(current_profile, extension->id()); |
return; |
} |