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

Unified Diff: services/service_manager/service_manager.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/service_manager.cc
diff --git a/services/service_manager/service_manager.cc b/services/service_manager/service_manager.cc
index d1fcd2a1c74c499e330c069b22da19b28c00ee88..dab2bd76dabab389e0279c67231b44db501aca2f 100644
--- a/services/service_manager/service_manager.cc
+++ b/services/service_manager/service_manager.cc
@@ -190,19 +190,15 @@
StartWithService(std::move(service));
}
- bool StartWithFilePath(const base::FilePath& path) {
- DCHECK(!service_);
- DCHECK(!path.empty());
+ void StartWithFilePath(const base::FilePath& path) {
+ CHECK(!service_);
runner_ = service_manager_->native_runner_factory_->Create(path);
- if (!runner_)
- return false;
bool start_sandboxed = false;
mojom::ServicePtr service = runner_->Start(
- identity_, start_sandboxed,
+ path, identity_, start_sandboxed,
base::Bind(&Instance::PIDAvailable, weak_factory_.GetWeakPtr()),
base::Bind(&Instance::OnRunnerCompleted, weak_factory_.GetWeakPtr()));
StartWithService(std::move(service));
- return true;
}
mojom::RunningServiceInfoPtr CreateRunningServiceInfo() const {
@@ -931,10 +927,9 @@
package_path = result->package_path;
}
- if (!instance->StartWithFilePath(package_path)) {
- OnInstanceError(instance);
- return;
- }
+ // TODO(rockot): Find a way to block this code path for content but allow
+ // it for chrome_mash.
+ instance->StartWithFilePath(package_path);
}
}
« no previous file with comments | « services/service_manager/runner/host/out_of_process_native_runner.cc ('k') | services/service_manager/standalone/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698