| Index: chrome/app/mash/mash_runner.cc
|
| diff --git a/chrome/app/mash/mash_runner.cc b/chrome/app/mash/mash_runner.cc
|
| index ddcb2605cc1a1e23ea909b28615b5319280979b4..6f43edba3363963bf5e6a841388613c073d34783 100644
|
| --- a/chrome/app/mash/mash_runner.cc
|
| +++ b/chrome/app/mash/mash_runner.cc
|
| @@ -32,9 +32,10 @@
|
| #include "services/service_manager/public/cpp/identity.h"
|
| #include "services/service_manager/public/cpp/service.h"
|
| #include "services/service_manager/public/cpp/service_context.h"
|
| -#include "services/service_manager/public/cpp/standalone_service/standalone_service.h"
|
| #include "services/service_manager/public/interfaces/service_factory.mojom.h"
|
| #include "services/service_manager/runner/common/switches.h"
|
| +#include "services/service_manager/runner/host/child_process.h"
|
| +#include "services/service_manager/runner/host/child_process_base.h"
|
| #include "services/service_manager/runner/init.h"
|
| #include "services/service_manager/standalone/context.h"
|
| #include "ui/base/resource/resource_bundle.h"
|
| @@ -92,11 +93,6 @@
|
| void AdjustCommandLineArgumentsForTarget(
|
| const service_manager::Identity& target,
|
| base::CommandLine* command_line) override {
|
| - if (target.name() == kChromeMashServiceName ||
|
| - target.name() == content::mojom::kBrowserServiceName) {
|
| - command_line->SetProgram(
|
| - base::CommandLine::ForCurrentProcess()->GetProgram());
|
| - }
|
| if (target.name() != content::mojom::kBrowserServiceName) {
|
| // If running anything other than the browser process, launch a mash
|
| // child process. The new process will execute MashRunner::RunChild().
|
| @@ -193,9 +189,16 @@
|
|
|
| service_manager::WaitForDebuggerIfNecessary();
|
|
|
| + base::FilePath path =
|
| + base::CommandLine::ForCurrentProcess()->GetSwitchValuePath(
|
| + switches::kChildProcess);
|
| + if (base::PathExists(path))
|
| + return service_manager::ChildProcessMain();
|
| +
|
| + // If the path doesn't exist - try launching this as a packaged service.
|
| base::i18n::InitializeICU();
|
| InitializeResources();
|
| - service_manager::RunStandaloneService(
|
| + service_manager::ChildProcessMainWithCallback(
|
| base::Bind(&MashRunner::StartChildApp, base::Unretained(this)));
|
| return 0;
|
| }
|
|
|