sandbox_mac.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // Copyright (c) 2012 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_MAC_SANDBOX_MAC_H_
  5. #define SANDBOX_POLICY_MAC_SANDBOX_MAC_H_
  6. #include <string>
  7. #include "base/files/file_path.h"
  8. #include "sandbox/policy/export.h"
  9. namespace base {
  10. class FilePath;
  11. }
  12. namespace sandbox {
  13. namespace mojom {
  14. enum class Sandbox;
  15. } // namespace mojom
  16. } // namespace sandbox
  17. namespace sandbox {
  18. namespace policy {
  19. // Convert provided path into a "canonical" path matching what the Sandbox
  20. // expects i.e. one without symlinks.
  21. // This path is not necessarily unique e.g. in the face of hardlinks.
  22. SANDBOX_POLICY_EXPORT base::FilePath GetCanonicalPath(
  23. const base::FilePath& path);
  24. // Returns the sandbox profile string for a given sandbox type.
  25. // It CHECKs that the sandbox profile is a valid type, so it always returns a
  26. // valid result, or crashes.
  27. SANDBOX_POLICY_EXPORT std::string GetSandboxProfile(
  28. sandbox::mojom::Sandbox sandbox_type);
  29. } // namespace policy
  30. } // namespace sandbox
  31. #endif // SANDBOX_POLICY_MAC_SANDBOX_MAC_H_