diff options
author | ben <ben@chromium.org> | 2016-03-17 17:54:45 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-18 00:56:14 +0000 |
commit | 5953178290205c37dbe478fcba0048d2141dcaf3 (patch) | |
tree | 2dc9aab91ea5e7537ff518553e0dbd88644f42f3 /mojo/shell | |
parent | 52e718a6d988b6058c0823955a8a70298e675c1d (diff) | |
download | chromium_src-5953178290205c37dbe478fcba0048d2141dcaf3.zip chromium_src-5953178290205c37dbe478fcba0048d2141dcaf3.tar.gz chromium_src-5953178290205c37dbe478fcba0048d2141dcaf3.tar.bz2 |
Rather than keeping it around forever, we should kill it. Now that the user shell is acting as the login broker for apps run for that user, it's not necessary to keep login too. This simplifies the login app a bit.
BUG=
Review URL: https://codereview.chromium.org/1806203002
Cr-Commit-Position: refs/heads/master@{#381856}
Diffstat (limited to 'mojo/shell')
4 files changed, 9 insertions, 4 deletions
diff --git a/mojo/shell/runner/host/child_process_host.cc b/mojo/shell/runner/host/child_process_host.cc index 1083128..f887dbd 100644 --- a/mojo/shell/runner/host/child_process_host.cc +++ b/mojo/shell/runner/host/child_process_host.cc @@ -58,7 +58,7 @@ ChildProcessHost::~ChildProcessHost() { } mojom::ShellClientPtr ChildProcessHost::Start( - const String& name, + const Identity& target, const ProcessReadyCallback& callback, const base::Closure& quit_closure) { DCHECK(!child_process_.IsValid()); @@ -77,6 +77,11 @@ mojom::ShellClientPtr ChildProcessHost::Start( child_command_line->AppendArguments(*parent_command_line, false); +#ifndef NDEBUG + child_command_line->AppendSwitchASCII("n", target.name()); + child_command_line->AppendSwitchASCII("u", target.user_id()); +#endif + if (target_path != app_path_) child_command_line->AppendSwitchPath(switches::kChildProcess, app_path_); diff --git a/mojo/shell/runner/host/child_process_host.h b/mojo/shell/runner/host/child_process_host.h index c13251a..9e0fb83 100644 --- a/mojo/shell/runner/host/child_process_host.h +++ b/mojo/shell/runner/host/child_process_host.h @@ -61,7 +61,7 @@ class ChildProcessHost { // |Start()|s the child process; calls |DidStart()| (on the thread on which // |Start()| was called) when the child has been started (or failed to start). - mojom::ShellClientPtr Start(const String& name, + mojom::ShellClientPtr Start(const Identity& target, const ProcessReadyCallback& callback, const base::Closure& quit_closure); diff --git a/mojo/shell/runner/host/child_process_host_unittest.cc b/mojo/shell/runner/host/child_process_host_unittest.cc index 593360d..ae513ab 100644 --- a/mojo/shell/runner/host/child_process_host_unittest.cc +++ b/mojo/shell/runner/host/child_process_host_unittest.cc @@ -96,7 +96,7 @@ TEST(ChildProcessHostTest, MAYBE_StartJoin) { Identity(), base::FilePath()); base::RunLoop run_loop; child_process_host.Start( - String(), + Identity(), base::Bind(&ProcessReadyCallbackAdapater, run_loop.QuitClosure()), base::Bind(&base::DoNothing)); run_loop.Run(); diff --git a/mojo/shell/runner/host/out_of_process_native_runner.cc b/mojo/shell/runner/host/out_of_process_native_runner.cc index 0bf38d5..30104dd 100644 --- a/mojo/shell/runner/host/out_of_process_native_runner.cc +++ b/mojo/shell/runner/host/out_of_process_native_runner.cc @@ -44,7 +44,7 @@ mojom::ShellClientPtr OutOfProcessNativeRunner::Start( child_process_host_.reset(new ChildProcessHost( launch_process_runner_, delegate_, start_sandboxed, target, app_path)); return child_process_host_->Start( - target.name(), pid_available_callback, + target, pid_available_callback, base::Bind(&OutOfProcessNativeRunner::AppCompleted, base::Unretained(this))); } |