Commit 4c023309 authored by Leo Zhang's avatar Leo Zhang Committed by Commit Bot

Enable 'ime' sandbox with decoder.

Start the IME service with an 'ime' sandbox when the build flag
ENABLE_CROS_IME_DECODER is true. This change is to help dev start
decoder engine easily.

By default, IME service will be started with a utility sandbox.

Bug: 837156
Change-Id: I7cefe8743298d713aeb257e48f3f7d9f9fca7564
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1743851Reviewed-by: default avatarSam McNally <sammc@chromium.org>
Commit-Queue: Leo Zhang <googleo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#685462}
parent 12536218
......@@ -116,6 +116,7 @@ source_set("manifest") {
deps = [
"//base",
"//chromeos/services/ime/public/cpp:buildflags",
"//chromeos/services/ime/public/mojom",
"//chromeos/strings",
"//services/service_manager/public/cpp",
......
......@@ -5,6 +5,8 @@
#include "chromeos/services/ime/public/cpp/manifest.h"
#include "base/no_destructor.h"
#include "build/buildflag.h"
#include "chromeos/services/ime/public/cpp/buildflags.h"
#include "chromeos/services/ime/public/mojom/constants.mojom.h"
#include "chromeos/services/ime/public/mojom/input_engine.mojom.h"
#include "chromeos/strings/grit/chromeos_strings.h"
......@@ -13,6 +15,16 @@
namespace chromeos {
namespace ime {
namespace {
#if BUILDFLAG(ENABLE_CROS_IME_DECODER)
const char kImeServiceSandboxType[] = "ime";
#else
const char kImeServiceSandboxType[] = "utility";
#endif
} // namespace
const service_manager::Manifest& GetManifest() {
static base::NoDestructor<service_manager::Manifest> manifest{
service_manager::ManifestBuilder()
......@@ -22,7 +34,7 @@ const service_manager::Manifest& GetManifest() {
service_manager::ManifestOptionsBuilder()
.WithExecutionMode(service_manager::Manifest::ExecutionMode::
kOutOfProcessBuiltin)
.WithSandboxType("utility")
.WithSandboxType(kImeServiceSandboxType)
.WithInstanceSharingPolicy(
service_manager::Manifest::InstanceSharingPolicy::
kSharedAcrossGroups)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment