| Index: apps/shell/browser/shell_browser_main_parts.cc
|
| diff --git a/apps/shell/browser/shell_browser_main_parts.cc b/apps/shell/browser/shell_browser_main_parts.cc
|
| index be1c82dc4d7ff153472becd2d2ce0649d92276bb..2bb594c5081c829183241e60d120b857247a1921 100644
|
| --- a/apps/shell/browser/shell_browser_main_parts.cc
|
| +++ b/apps/shell/browser/shell_browser_main_parts.cc
|
| @@ -10,9 +10,6 @@
|
| #include "apps/shell/browser/shell_extension_system_factory.h"
|
| #include "apps/shell/browser/shell_extensions_browser_client.h"
|
| #include "apps/shell/common/shell_extensions_client.h"
|
| -#include "base/command_line.h"
|
| -#include "base/file_util.h"
|
| -#include "base/files/file_path.h"
|
| #include "base/run_loop.h"
|
| #include "components/keyed_service/content/browser_context_dependency_manager.h"
|
| #include "content/public/common/result_codes.h"
|
| @@ -47,10 +44,13 @@ void EnsureBrowserContextKeyedServiceFactoriesBuilt() {
|
| namespace apps {
|
|
|
| ShellBrowserMainParts::ShellBrowserMainParts(
|
| - const content::MainFunctionParams& parameters)
|
| + const content::MainFunctionParams& parameters,
|
| + StartCallback* start_callback)
|
| : extension_system_(NULL),
|
| parameters_(parameters),
|
| - run_message_loop_(true) {}
|
| + run_message_loop_(true),
|
| + start_callback_(start_callback) {
|
| +}
|
|
|
| ShellBrowserMainParts::~ShellBrowserMainParts() {
|
| }
|
| @@ -105,20 +105,13 @@ void ShellBrowserMainParts::PreMainMessageLoopRun() {
|
|
|
| devtools_delegate_.reset(
|
| new content::ShellDevToolsDelegate(browser_context_.get()));
|
| -
|
| - const std::string kAppSwitch = "app";
|
| - CommandLine* command_line = CommandLine::ForCurrentProcess();
|
| - if (command_line->HasSwitch(kAppSwitch)) {
|
| - base::FilePath app_dir(command_line->GetSwitchValueNative(kAppSwitch));
|
| - base::FilePath app_absolute_dir = base::MakeAbsoluteFilePath(app_dir);
|
| - extension_system_->LoadAndLaunchApp(app_absolute_dir);
|
| - } else if (parameters_.ui_task) {
|
| + if (parameters_.ui_task) {
|
| // For running browser tests.
|
| parameters_.ui_task->Run();
|
| delete parameters_.ui_task;
|
| run_message_loop_ = false;
|
| } else {
|
| - LOG(ERROR) << "--" << kAppSwitch << " unset; boredom is in your future";
|
| + start_callback_->Run(browser_context_.get());
|
| }
|
| }
|
|
|
|
|