sandbox_type.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Copyright 2017 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. #ifndef SANDBOX_POLICY_SANDBOX_TYPE_H_
  5. #define SANDBOX_POLICY_SANDBOX_TYPE_H_
  6. #include <string>
  7. #include "base/command_line.h"
  8. #include "sandbox/policy/export.h"
  9. namespace sandbox {
  10. namespace mojom {
  11. enum class Sandbox;
  12. } // namespace mojom
  13. namespace policy {
  14. SANDBOX_POLICY_EXPORT bool IsUnsandboxedSandboxType(
  15. sandbox::mojom::Sandbox sandbox_type);
  16. SANDBOX_POLICY_EXPORT void SetCommandLineFlagsForSandboxType(
  17. base::CommandLine* command_line,
  18. sandbox::mojom::Sandbox sandbox_type);
  19. SANDBOX_POLICY_EXPORT sandbox::mojom::Sandbox SandboxTypeFromCommandLine(
  20. const base::CommandLine& command_line);
  21. SANDBOX_POLICY_EXPORT std::string StringFromUtilitySandboxType(
  22. sandbox::mojom::Sandbox sandbox_type);
  23. SANDBOX_POLICY_EXPORT sandbox::mojom::Sandbox UtilitySandboxTypeFromString(
  24. const std::string& sandbox_string);
  25. } // namespace policy
  26. } // namespace sandbox
  27. #endif // SANDBOX_POLICY_SANDBOX_TYPE_H_