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

Unified Diff: content/browser/service_manager/service_manager_context.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
« no previous file with comments | « chrome/test/base/mojo_test_connector.cc ('k') | services/catalog/reader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/service_manager/service_manager_context.cc
diff --git a/content/browser/service_manager/service_manager_context.cc b/content/browser/service_manager/service_manager_context.cc
index a76a59f9850efecf8e1e813e7cd8dfd1d1ad6c46..2b211b4511f52a523581e026e33ba0523c759a5f 100644
--- a/content/browser/service_manager/service_manager_context.cc
+++ b/content/browser/service_manager/service_manager_context.cc
@@ -37,6 +37,7 @@
#include "services/service_manager/public/cpp/service.h"
#include "services/service_manager/public/interfaces/service.mojom.h"
#include "services/service_manager/runner/common/client_util.h"
+#include "services/service_manager/runner/host/in_process_native_runner.h"
#include "services/service_manager/service_manager.h"
namespace content {
@@ -131,22 +132,6 @@
std::map<std::string, std::unique_ptr<base::Value>> manifests_;
DISALLOW_COPY_AND_ASSIGN(BuiltinManifestProvider);
-};
-
-class NullNativeRunnerFactory : public service_manager::NativeRunnerFactory {
- public:
- NullNativeRunnerFactory() {}
- ~NullNativeRunnerFactory() override {}
-
- std::unique_ptr<service_manager::NativeRunner> Create(
- const base::FilePath& service_path) override {
- LOG(ERROR) << "Attempting to run unsupported native service: "
- << service_path.value();
- return nullptr;
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NullNativeRunnerFactory);
};
} // namespace
@@ -189,10 +174,12 @@
manifest_provider_ = std::move(manifest_provider);
base::SequencedWorkerPool* blocking_pool = BrowserThread::GetBlockingPool();
+ std::unique_ptr<service_manager::NativeRunnerFactory> native_runner_factory(
+ new service_manager::InProcessNativeRunnerFactory(blocking_pool));
catalog_.reset(
new catalog::Catalog(blocking_pool, nullptr, manifest_provider_.get()));
service_manager_.reset(new service_manager::ServiceManager(
- base::MakeUnique<NullNativeRunnerFactory>(), catalog_->TakeService()));
+ std::move(native_runner_factory), catalog_->TakeService()));
service_manager::mojom::ServiceRequest request =
service_manager_->StartEmbedderService(mojom::kBrowserServiceName);
« no previous file with comments | « chrome/test/base/mojo_test_connector.cc ('k') | services/catalog/reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698