summaryrefslogtreecommitdiffstats
path: root/apps/app_shim
diff options
context:
space:
mode:
authorjackhou@chromium.org <jackhou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-23 07:47:12 +0000
committerjackhou@chromium.org <jackhou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-23 07:47:12 +0000
commit66aafb0cf04501a73cfa94d99d0be958126ebe85 (patch)
tree34761016cef32e976a674d5d3f6270722569a62c /apps/app_shim
parent8b52c1b854bf6639495160c7dd1b7077a0c9a6f0 (diff)
downloadchromium_src-66aafb0cf04501a73cfa94d99d0be958126ebe85.zip
chromium_src-66aafb0cf04501a73cfa94d99d0be958126ebe85.tar.gz
chromium_src-66aafb0cf04501a73cfa94d99d0be958126ebe85.tar.bz2
Fix launching an app via the shim.
http://crrev.com/21005003 introduced a regression where app shims launched with no files (the default case) do not actually launch the app. This CL checks whether any files were passed in and, if not, launches the app with no launch data. BUG=168080,292566 TEST=Starting an app shim should start the app. Review URL: https://chromiumcodereview.appspot.com/24353002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224690 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'apps/app_shim')
-rw-r--r--apps/app_shim/extension_app_shim_handler_mac.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/app_shim/extension_app_shim_handler_mac.cc b/apps/app_shim/extension_app_shim_handler_mac.cc
index 9e6077d..b2f9a1a 100644
--- a/apps/app_shim/extension_app_shim_handler_mac.cc
+++ b/apps/app_shim/extension_app_shim_handler_mac.cc
@@ -140,9 +140,13 @@ void ExtensionAppShimHandler::Delegate::LaunchApp(
const std::vector<base::FilePath>& files) {
CoreAppLauncherHandler::RecordAppLaunchType(
extension_misc::APP_LAUNCH_CMD_LINE_APP, extension->GetType());
- for (std::vector<base::FilePath>::const_iterator it = files.begin();
- it != files.end(); ++it) {
- apps::LaunchPlatformAppWithPath(profile, extension, *it);
+ if (files.empty()) {
+ apps::LaunchPlatformApp(profile, extension);
+ } else {
+ for (std::vector<base::FilePath>::const_iterator it = files.begin();
+ it != files.end(); ++it) {
+ apps::LaunchPlatformAppWithPath(profile, extension, *it);
+ }
}
}