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

Unified Diff: content/utility/utility_service_factory.cc

Issue 2774463002: image_decoder service -> data_decoder service (Closed)
Patch Set: . Created 3 years, 9 months 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 | « content/utility/DEPS ('k') | services/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/utility/utility_service_factory.cc
diff --git a/content/utility/utility_service_factory.cc b/content/utility/utility_service_factory.cc
index e70647c261d6349a67e5d21998154ebcc9c0dcd2..9a28ba475673f807c857ac8006b1f9cd5a7c747d 100644
--- a/content/utility/utility_service_factory.cc
+++ b/content/utility/utility_service_factory.cc
@@ -9,6 +9,8 @@
#include "content/public/utility/content_utility_client.h"
#include "content/public/utility/utility_thread.h"
#include "content/utility/utility_thread_impl.h"
+#include "services/data_decoder/data_decoder_service.h"
+#include "services/data_decoder/public/interfaces/constants.mojom.h"
#include "services/shape_detection/public/interfaces/constants.mojom.h"
#include "services/shape_detection/shape_detection_service.h"
@@ -18,6 +20,15 @@
namespace content {
+namespace {
+
+std::unique_ptr<service_manager::Service> CreateDataDecoderService() {
+ content::UtilityThread::Get()->EnsureBlinkInitialized();
+ return data_decoder::DataDecoderService::Create();
+}
+
+} // namespace
+
UtilityServiceFactory::UtilityServiceFactory() {}
UtilityServiceFactory::~UtilityServiceFactory() {}
@@ -35,6 +46,11 @@ void UtilityServiceFactory::RegisterServices(ServiceMap* services) {
base::Bind(&shape_detection::ShapeDetectionService::Create);
services->insert(std::make_pair(shape_detection::mojom::kServiceName,
shape_detection_info));
+
+ ServiceInfo data_decoder_info;
+ data_decoder_info.factory = base::Bind(&CreateDataDecoderService);
+ services->insert(
+ std::make_pair(data_decoder::mojom::kServiceName, data_decoder_info));
}
void UtilityServiceFactory::OnServiceQuit() {
« no previous file with comments | « content/utility/DEPS ('k') | services/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698