[M85 Dev][EFL] Fix errors to generate ninja files
[platform/framework/web/chromium-efl.git] / chrome / browser / service_sandbox_type.h
1 // Copyright 2020 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_SERVICE_SANDBOX_TYPE_H_
6 #define CHROME_BROWSER_SERVICE_SANDBOX_TYPE_H_
7
8 #include "build/build_config.h"
9 #include "content/public/browser/sandbox_type.h"
10 #include "content/public/browser/service_process_host.h"
11
12 #if !defined(OS_ANDROID)
13 #include "chrome/services/speech/buildflags.h"
14 #endif  // !defined(OS_ANDROID)
15
16 // This file maps service classes to sandbox types.  Services which
17 // require a non-utility sandbox can be added here.  See
18 // ServiceProcessHost::Launch() for how these templates are consumed.
19
20 // chrome::mojom::RemovableStorageWriter
21 namespace chrome {
22 namespace mojom {
23 class RemovableStorageWriter;
24 }  // namespace mojom
25 }  // namespace chrome
26
27 template <>
28 inline content::SandboxType
29 content::GetServiceSandboxType<chrome::mojom::RemovableStorageWriter>() {
30 #if defined(OS_WIN)
31   return SandboxType::kNoSandboxAndElevatedPrivileges;
32 #else
33   return SandboxType::kNoSandbox;
34 #endif  // !defined(OS_WIN)
35 }
36
37 // chrome::mojom::UtilReadIcon
38 #if defined(OS_WIN)
39 namespace chrome {
40 namespace mojom {
41 class UtilReadIcon;
42 }
43 }  // namespace chrome
44
45 template <>
46 inline content::SandboxType
47 content::GetServiceSandboxType<chrome::mojom::UtilReadIcon>() {
48   return content::SandboxType::kIconReader;
49 }
50 #endif  // defined(OS_WIN)
51
52 // chrome::mojom::UtilWin
53 #if defined(OS_WIN)
54 namespace chrome {
55 namespace mojom {
56 class UtilWin;
57 }
58 }  // namespace chrome
59
60 template <>
61 inline content::SandboxType
62 content::GetServiceSandboxType<chrome::mojom::UtilWin>() {
63   return content::SandboxType::kNoSandbox;
64 }
65 #endif  // defined(OS_WIN)
66
67 // chrome::mojom::ProfileImport
68 namespace chrome {
69 namespace mojom {
70 class ProfileImport;
71 }
72 }  // namespace chrome
73
74 template <>
75 inline content::SandboxType
76 content::GetServiceSandboxType<chrome::mojom::ProfileImport>() {
77   return content::SandboxType::kNoSandbox;
78 }
79
80 // media::mojom::SpeechRecognitionService
81 #if !defined(OS_ANDROID)
82 #if BUILDFLAG(ENABLE_SODA)
83 namespace media {
84 namespace mojom {
85 class SpeechRecognitionService;
86 }
87 }  // namespace media
88
89 template <>
90 inline content::SandboxType
91 content::GetServiceSandboxType<media::mojom::SpeechRecognitionService>() {
92   return content::SandboxType::kSpeechRecognition;
93 }
94 #endif  // BUILDFLAG(ENABLE_SODA)
95 #endif  // !defined(OS_ANDROID)
96
97 // printing::mojom::PrintingService
98 #if defined(OS_WIN)
99 namespace printing {
100 namespace mojom {
101 class PrintingService;
102 }
103 }  // namespace printing
104
105 template <>
106 inline content::SandboxType
107 content::GetServiceSandboxType<printing::mojom::PrintingService>() {
108   return content::SandboxType::kPdfConversion;
109 }
110 #endif  // defined(OS_WIN)
111
112 // proxy_resolver::mojom::ProxyResolverFactory
113 #if defined(OS_WIN)
114 namespace proxy_resolver {
115 namespace mojom {
116 class ProxyResolverFactory;
117 }
118 }  // namespace proxy_resolver
119
120 template <>
121 inline content::SandboxType
122 content::GetServiceSandboxType<proxy_resolver::mojom::ProxyResolverFactory>() {
123   return content::SandboxType::kProxyResolver;
124 }
125 #endif  // defined(OS_WIN)
126
127 // quarantine::mojom::Quarantine
128 #if defined(OS_WIN)
129 namespace quarantine {
130 namespace mojom {
131 class Quarantine;
132 }
133 }  // namespace quarantine
134
135 template <>
136 inline content::SandboxType
137 content::GetServiceSandboxType<quarantine::mojom::Quarantine>() {
138   return content::SandboxType::kNoSandbox;
139 }
140 #endif  // defined(OS_WIN)
141
142 // sharing::mojom::Sharing
143 #if !defined(OS_MACOSX)
144 namespace sharing {
145 namespace mojom {
146 class Sharing;
147 }
148 }  // namespace sharing
149
150 template <>
151 inline content::SandboxType
152 content::GetServiceSandboxType<sharing::mojom::Sharing>() {
153   return content::SandboxType::kSharingService;
154 }
155 #endif  // !defined(OS_MACOSX)
156
157 #endif  // CHROME_BROWSER_SERVICE_SANDBOX_TYPE_H_