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

Unified Diff: content/browser/browser_context.cc

Issue 2528743002: Shape Detection: Implement FaceDetection on Mac as out-of-process service (Closed)
Patch Set: Rebase onto CL2460723003 and yzshen1@ comments 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 | « content/browser/BUILD.gn ('k') | content/browser/service_manager/service_manager_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_context.cc
diff --git a/content/browser/browser_context.cc b/content/browser/browser_context.cc
index 8d54f02107576882c7e95aa261c9149219a57acb..425abf16968632be60b28e2358c095e5bad9f146 100644
--- a/content/browser/browser_context.cc
+++ b/content/browser/browser_context.cc
@@ -47,6 +47,8 @@
#include "services/service_manager/public/cpp/connection.h"
#include "services/service_manager/public/cpp/connector.h"
#include "services/service_manager/public/interfaces/service.mojom.h"
+#include "services/shape_detection/public/interfaces/constants.mojom.h"
+#include "services/shape_detection/shape_detection_service.h"
#include "storage/browser/database/database_tracker.h"
#include "storage/browser/fileapi/external_mount_points.h"
@@ -467,6 +469,14 @@ void BrowserContext::Initialize(
BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE));
connection->AddEmbeddedService(device::mojom::kServiceName, info);
+ // Shape Detection Service is in browser process for now. If we see crashes
yzshen1 2016/12/05 17:41:19 I feel that this comment is not very useful. Do we
xianglu 2016/12/05 18:50:02 There have been different opinions on the process
yzshen1 2016/12/05 19:38:29 I mean, usually we don't consider crashes as somet
+ // in the future, consider moving it to a utility process.
+ ServiceInfo shape_detection_info;
+ shape_detection_info.factory =
+ base::Bind(&shape_detection::ShapeDetectionService::Create);
+ connection->AddEmbeddedService(shape_detection::mojom::kServiceName,
+ shape_detection_info);
+
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kMojoLocalStorage)) {
ServiceInfo info;
« no previous file with comments | « content/browser/BUILD.gn ('k') | content/browser/service_manager/service_manager_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698