Avi Drissman | 4e1b7bc3 | 2022-09-15 14:03:50 | [diff] [blame] | 1 | // Copyright 2017 The Chromium Authors |
kerrnel | 0f7a192 | 2017-06-26 23:40:58 | [diff] [blame] | 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 CONTENT_BROWSER_SANDBOX_PARAMETERS_MAC_H_ |
| 6 | #define CONTENT_BROWSER_SANDBOX_PARAMETERS_MAC_H_ |
| 7 | |
Greg Kerr | 65f314fb | 2018-11-09 20:35:25 | [diff] [blame] | 8 | #include "content/common/content_export.h" |
| 9 | |
Greg Kerr | c382e2ae | 2017-12-14 23:43:34 | [diff] [blame] | 10 | namespace base { |
| 11 | class CommandLine; |
Robert Sesek | 6a9e65f | 2019-08-14 20:02:34 | [diff] [blame] | 12 | class FilePath; |
Greg Kerr | c382e2ae | 2017-12-14 23:43:34 | [diff] [blame] | 13 | } |
| 14 | |
kerrnel | 0f7a192 | 2017-06-26 23:40:58 | [diff] [blame] | 15 | namespace sandbox { |
Evan Stade | 526e35a6 | 2025-02-01 00:09:37 | [diff] [blame] | 16 | class SandboxSerializer; |
Alex Gough | eb6a38f | 2021-10-22 01:55:13 | [diff] [blame] | 17 | namespace mojom { |
| 18 | enum class Sandbox; |
| 19 | } // namespace mojom |
| 20 | } // namespace sandbox |
kerrnel | 0f7a192 | 2017-06-26 23:40:58 | [diff] [blame] | 21 | |
| 22 | namespace content { |
| 23 | |
Greg Kerr | b7fdb79 | 2019-04-24 23:05:46 | [diff] [blame] | 24 | // This populates the sandbox parameters in the client for the given |
| 25 | // |sandbox_type|. Some parameters may be extracted from the |command_line|. |
Ken Rockot | af26458 | 2024-05-23 01:03:27 | [diff] [blame] | 26 | CONTENT_EXPORT bool SetupSandboxParameters( |
Alex Gough | eb6a38f | 2021-10-22 01:55:13 | [diff] [blame] | 27 | sandbox::mojom::Sandbox sandbox_type, |
Greg Kerr | b7fdb79 | 2019-04-24 23:05:46 | [diff] [blame] | 28 | const base::CommandLine& command_line, |
Evan Stade | 526e35a6 | 2025-02-01 00:09:37 | [diff] [blame] | 29 | sandbox::SandboxSerializer* serializer); |
kerrnel | 0f7a192 | 2017-06-26 23:40:58 | [diff] [blame] | 30 | |
Alex Gough | 9ab468a6c3 | 2019-12-10 19:10:22 | [diff] [blame] | 31 | // Expands the SandboxType::kNetwork policy to allow reading files from |
Robert Sesek | 6a9e65f | 2019-08-14 20:02:34 | [diff] [blame] | 32 | // the specified |path|, which stores TLS certificates used by the browser |
| 33 | // test web servers. |
| 34 | CONTENT_EXPORT void SetNetworkTestCertsDirectoryForTesting( |
| 35 | const base::FilePath& path); |
| 36 | |
kerrnel | 0f7a192 | 2017-06-26 23:40:58 | [diff] [blame] | 37 | } // namespace content |
| 38 | |
| 39 | #endif // CONTENT_BROWSER_SANDBOX_PARAMETERS_MAC_H_ |