| Index: extensions/shell/browser/default_shell_browser_main_delegate.cc
|
| diff --git a/extensions/shell/browser/default_shell_browser_main_delegate.cc b/extensions/shell/browser/default_shell_browser_main_delegate.cc
|
| index 74a5473756ea4a453834ff2fc0ec751a318e294c..c73a35f9a32ec88318951cca6826cc892bc1f66a 100644
|
| --- a/extensions/shell/browser/default_shell_browser_main_delegate.cc
|
| +++ b/extensions/shell/browser/default_shell_browser_main_delegate.cc
|
| @@ -4,11 +4,9 @@
|
|
|
| #include "extensions/shell/browser/default_shell_browser_main_delegate.h"
|
|
|
| -#include "apps/launcher.h"
|
| #include "base/command_line.h"
|
| #include "base/files/file_path.h"
|
| #include "base/files/file_util.h"
|
| -#include "base/path_service.h"
|
| #include "base/strings/string_tokenizer.h"
|
| #include "build/build_config.h"
|
| #include "extensions/common/switches.h"
|
| @@ -45,25 +43,22 @@
|
| base::CommandLine::StringType::const_iterator>
|
| tokenizer(path_list, FILE_PATH_LITERAL(","));
|
|
|
| - const Extension* launch_app = nullptr;
|
| + std::string launch_id;
|
| while (tokenizer.GetNext()) {
|
| base::FilePath app_absolute_dir =
|
| base::MakeAbsoluteFilePath(base::FilePath(tokenizer.token()));
|
|
|
| const Extension* extension = extension_system->LoadApp(app_absolute_dir);
|
| - if (extension && !launch_app)
|
| - launch_app = extension;
|
| + if (!extension)
|
| + continue;
|
| + if (launch_id.empty())
|
| + launch_id = extension->id();
|
| }
|
|
|
| - if (launch_app) {
|
| - base::FilePath current_directory;
|
| - base::PathService::Get(base::DIR_CURRENT, ¤t_directory);
|
| - apps::LaunchPlatformAppWithCommandLineAndLaunchId(
|
| - browser_context, launch_app, launch_app->id(), *command_line,
|
| - current_directory, SOURCE_COMMAND_LINE);
|
| - } else {
|
| + if (!launch_id.empty())
|
| + extension_system->LaunchApp(launch_id);
|
| + else
|
| LOG(ERROR) << "Could not load any apps.";
|
| - }
|
| } else {
|
| LOG(ERROR) << "--" << switches::kLoadApps
|
| << " unset; boredom is in your future";
|
|
|