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

Unified Diff: chrome/app/mash/mash_runner.cc

Issue 2576233002: Consolidating the mojo NativeRunner functionality. (Closed)
Patch Set: Merged mojo_runner_host_unittests in service_manager_unittests 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
« no previous file with comments | « no previous file | chrome/test/base/mojo_test_connector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/mash/mash_runner.cc
diff --git a/chrome/app/mash/mash_runner.cc b/chrome/app/mash/mash_runner.cc
index a7e76c7a58b715912eca01bd7514f79ad072f813..3ca96fa1acf6de468873b433bc23d729d23a2424 100644
--- a/chrome/app/mash/mash_runner.cc
+++ b/chrome/app/mash/mash_runner.cc
@@ -32,7 +32,6 @@
#include "services/catalog/public/interfaces/catalog.mojom.h"
#include "services/catalog/public/interfaces/constants.mojom.h"
#include "services/service_manager/background/background_service_manager.h"
-#include "services/service_manager/native_runner_delegate.h"
#include "services/service_manager/public/cpp/connector.h"
#include "services/service_manager/public/cpp/identity.h"
#include "services/service_manager/public/cpp/service.h"
@@ -87,16 +86,17 @@ void InitializeResources() {
locale, nullptr, ui::ResourceBundle::LOAD_COMMON_RESOURCES);
}
-class NativeRunnerDelegateImpl : public service_manager::NativeRunnerDelegate {
+class ServiceProcessLauncherDelegateImpl
+ : public service_manager::ServiceProcessLauncher::Delegate {
public:
- NativeRunnerDelegateImpl() {}
- ~NativeRunnerDelegateImpl() override {}
+ ServiceProcessLauncherDelegateImpl() {}
+ ~ServiceProcessLauncherDelegateImpl() override {}
private:
- // service_manager::NativeRunnerDelegate:
+ // service_manager::ServiceProcessLauncher::Delegate:
void AdjustCommandLineArgumentsForTarget(
- const service_manager::Identity& target,
- base::CommandLine* command_line) override {
+ const service_manager::Identity& target,
+ base::CommandLine* command_line) override {
if (target.name() == kChromeMashServiceName ||
target.name() == content::mojom::kBrowserServiceName) {
base::FilePath exe_path;
@@ -124,7 +124,7 @@ class NativeRunnerDelegateImpl : public service_manager::NativeRunnerDelegate {
*command_line = base::CommandLine(new_argv);
}
- DISALLOW_COPY_AND_ASSIGN(NativeRunnerDelegateImpl);
+ DISALLOW_COPY_AND_ASSIGN(ServiceProcessLauncherDelegateImpl);
};
} // namespace
@@ -148,11 +148,12 @@ void MashRunner::RunMain() {
// TODO(sky): refactor BackgroundServiceManager so can supply own context, we
// shouldn't we using context as it has a lot of stuff we don't really want
// in chrome.
- NativeRunnerDelegateImpl native_runner_delegate;
+ ServiceProcessLauncherDelegateImpl service_process_launcher_delegate;
service_manager::BackgroundServiceManager background_service_manager;
std::unique_ptr<service_manager::BackgroundServiceManager::InitParams>
init_params(new service_manager::BackgroundServiceManager::InitParams);
- init_params->native_runner_delegate = &native_runner_delegate;
+ init_params->service_process_launcher_delegate =
+ &service_process_launcher_delegate;
background_service_manager.Init(std::move(init_params));
context_.reset(new service_manager::ServiceContext(
base::MakeUnique<mash::MashPackagedService>(),
« no previous file with comments | « no previous file | chrome/test/base/mojo_test_connector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698