Chromium Code Reviews| Index: content/browser/browser_context.cc |
| diff --git a/content/browser/browser_context.cc b/content/browser/browser_context.cc |
| index 8d54f02107576882c7e95aa261c9149219a57acb..b09b5cab292a5c2a18075f9b5921cd8e1b077708 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,16 @@ void BrowserContext::Initialize( |
| BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)); |
| connection->AddEmbeddedService(device::mojom::kServiceName, info); |
| + // Shape Detection Service is in browser process for now. Because native |
| + // Mac API |CIDetector| does GPU-privileged operations, and we don't have |
| + // full control over it, please consider moving it to a utility process if |
| + // we see crashes in the future. |
|
Avi (use Gerrit)
2016/12/06 05:44:21
I'm not sure that this solves the concerns of runn
xianglu
2016/12/08 01:20:54
My apologies. This comment is too misleading. I me
|
| + 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; |