summaryrefslogtreecommitdiff
path: root/chromium/content/utility/utility_main.cc
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-12 14:27:29 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-13 09:35:20 +0000
commitc30a6232df03e1efbd9f3b226777b07e087a1122 (patch)
treee992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/content/utility/utility_main.cc
parent7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff)
downloadqtwebengine-chromium-85-based.tar.gz
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/content/utility/utility_main.cc')
-rw-r--r--chromium/content/utility/utility_main.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/chromium/content/utility/utility_main.cc b/chromium/content/utility/utility_main.cc
index 58372b4a2cc..f5bdb79ce99 100644
--- a/chromium/content/utility/utility_main.cc
+++ b/chromium/content/utility/utility_main.cc
@@ -15,9 +15,11 @@
#include "build/build_config.h"
#include "content/child/child_process.h"
#include "content/common/content_switches_internal.h"
+#include "content/public/common/content_client.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/main_function_params.h"
#include "content/public/common/sandbox_init.h"
+#include "content/public/utility/content_utility_client.h"
#include "content/utility/utility_thread_impl.h"
#include "services/service_manager/sandbox/sandbox.h"
#include "services/tracing/public/cpp/trace_startup.h"
@@ -31,6 +33,7 @@
#if defined(OS_CHROMEOS)
#include "chromeos/services/ime/ime_sandbox_hook.h"
+#include "chromeos/services/tts/tts_sandbox_hook.h"
#endif
#if defined(OS_MACOSX)
@@ -89,6 +92,7 @@ int UtilityMain(const MainFunctionParams& parameters) {
sandbox_type == service_manager::SandboxType::kNetwork ||
#if defined(OS_CHROMEOS)
sandbox_type == service_manager::SandboxType::kIme ||
+ sandbox_type == service_manager::SandboxType::kTts ||
#endif // OS_CHROMEOS
sandbox_type == service_manager::SandboxType::kAudio ||
sandbox_type == service_manager::SandboxType::kSpeechRecognition) {
@@ -103,6 +107,8 @@ int UtilityMain(const MainFunctionParams& parameters) {
#if defined(OS_CHROMEOS)
else if (sandbox_type == service_manager::SandboxType::kIme)
pre_sandbox_hook = base::BindOnce(&chromeos::ime::ImePreSandboxHook);
+ else if (sandbox_type == service_manager::SandboxType::kTts)
+ pre_sandbox_hook = base::BindOnce(&chromeos::tts::TtsPreSandboxHook);
#endif // OS_CHROMEOS
service_manager::Sandbox::Initialize(
@@ -114,6 +120,8 @@ int UtilityMain(const MainFunctionParams& parameters) {
#endif
ChildProcess utility_process;
+ GetContentClient()->utility()->PostIOThreadCreated(
+ utility_process.io_task_runner());
base::RunLoop run_loop;
utility_process.set_main_thread(
new UtilityThreadImpl(run_loop.QuitClosure()));