| Index: chrome/browser/dom_ui/app_launcher_handler.cc
|
| diff --git a/chrome/browser/dom_ui/app_launcher_handler.cc b/chrome/browser/dom_ui/app_launcher_handler.cc
|
| index f55052576f9365503d58708fa7c16d808294bb80..add08cb768a8a5bb289f8fc892d52d5ac9f91a35 100644
|
| --- a/chrome/browser/dom_ui/app_launcher_handler.cc
|
| +++ b/chrome/browser/dom_ui/app_launcher_handler.cc
|
| @@ -248,8 +248,19 @@ void AppLauncherHandler::HandleLaunchApp(const ListValue* args) {
|
| old_contents = browser->GetSelectedTabContents();
|
|
|
| AnimateAppIcon(extension, rect);
|
| +
|
| + extension_misc::LaunchContainer launch_container =
|
| + extension->launch_container();
|
| + ExtensionPrefs::LaunchType prefs_launch_type =
|
| + extensions_service_->extension_prefs()->GetLaunchType(extension_id);
|
| +
|
| + // If the user chose to open in a window, change the container type.
|
| + if (prefs_launch_type == ExtensionPrefs::LAUNCH_WINDOW) {
|
| + launch_container = extension_misc::LAUNCH_WINDOW;
|
| + }
|
| +
|
| TabContents* new_contents = Browser::OpenApplication(
|
| - profile, extension, extension->launch_container(), old_contents);
|
| + profile, extension, launch_container, old_contents);
|
|
|
| if (new_contents != old_contents && browser->tab_count() > 1)
|
| browser->CloseTabContents(old_contents);
|
| @@ -310,7 +321,7 @@ void AppLauncherHandler::HandleHideAppsPromo(const ListValue* args) {
|
| extensions_service_->default_apps()->SetPromoHidden();
|
| }
|
|
|
| -//static
|
| +// static
|
| void AppLauncherHandler::RecordWebStoreLaunch(bool promo_active) {
|
| if (!promo_active) return;
|
|
|
| @@ -319,7 +330,7 @@ void AppLauncherHandler::RecordWebStoreLaunch(bool promo_active) {
|
| extension_misc::PROMO_BUCKET_BOUNDARY);
|
| }
|
|
|
| -//static
|
| +// static
|
| void AppLauncherHandler::RecordAppLaunch(bool promo_active) {
|
| // TODO(jstritar): record app launches that occur when the promo is not
|
| // active using a different histogram.
|
|
|