Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Unified Diff: services/service_manager/runner/host/out_of_process_native_runner.cc

Issue 2566663004: Revert of Build services as standalone executables (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: services/service_manager/runner/host/out_of_process_native_runner.cc
diff --git a/services/service_manager/runner/host/out_of_process_native_runner.cc b/services/service_manager/runner/host/out_of_process_native_runner.cc
index 0df2edf9cfc0b88fb35c780ffac529cef56db2f3..9edd59d833751cc58e1c25d07516bbd8abb4a319 100644
--- a/services/service_manager/runner/host/out_of_process_native_runner.cc
+++ b/services/service_manager/runner/host/out_of_process_native_runner.cc
@@ -16,33 +16,33 @@
#include "base/task_runner.h"
#include "services/service_manager/runner/common/client_util.h"
#include "services/service_manager/runner/host/child_process_host.h"
+#include "services/service_manager/runner/host/in_process_native_runner.h"
namespace service_manager {
OutOfProcessNativeRunner::OutOfProcessNativeRunner(
- const base::FilePath& service_path,
base::TaskRunner* launch_process_runner,
NativeRunnerDelegate* delegate)
- : launch_process_runner_(launch_process_runner),
- delegate_(delegate),
- service_path_(service_path) {}
+ : launch_process_runner_(launch_process_runner), delegate_(delegate) {}
OutOfProcessNativeRunner::~OutOfProcessNativeRunner() {
- if (child_process_host_ && !service_path_.empty())
+ if (child_process_host_ && !app_path_.empty())
child_process_host_->Join();
}
mojom::ServicePtr OutOfProcessNativeRunner::Start(
+ const base::FilePath& app_path,
const Identity& target,
bool start_sandboxed,
const base::Callback<void(base::ProcessId)>& pid_available_callback,
const base::Closure& app_completed_callback) {
+ app_path_ = app_path;
+
DCHECK(app_completed_callback_.is_null());
app_completed_callback_ = app_completed_callback;
child_process_host_.reset(new ChildProcessHost(
- launch_process_runner_, delegate_, start_sandboxed, target,
- service_path_));
+ launch_process_runner_, delegate_, start_sandboxed, target, app_path));
return child_process_host_->Start(
target, pid_available_callback,
base::Bind(&OutOfProcessNativeRunner::AppCompleted,
@@ -64,13 +64,12 @@
base::TaskRunner* launch_process_runner,
NativeRunnerDelegate* delegate)
: launch_process_runner_(launch_process_runner), delegate_(delegate) {}
-
OutOfProcessNativeRunnerFactory::~OutOfProcessNativeRunnerFactory() {}
std::unique_ptr<NativeRunner> OutOfProcessNativeRunnerFactory::Create(
- const base::FilePath& service_path) {
- return base::MakeUnique<OutOfProcessNativeRunner>(
- service_path, launch_process_runner_, delegate_);
+ const base::FilePath& app_path) {
+ return base::MakeUnique<OutOfProcessNativeRunner>(launch_process_runner_,
+ delegate_);
}
} // namespace service_manager
« no previous file with comments | « services/service_manager/runner/host/out_of_process_native_runner.h ('k') | services/service_manager/service_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698