| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_COMMON_SANDBOX_MAC_H_ | 5 #ifndef CONTENT_COMMON_SANDBOX_MAC_H_ |
| 6 #define CONTENT_COMMON_SANDBOX_MAC_H_ | 6 #define CONTENT_COMMON_SANDBOX_MAC_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 std::map<std::string, std::string> params_map_; | 55 std::map<std::string, std::string> params_map_; |
| 56 | 56 |
| 57 // The sandbox profile source code. | 57 // The sandbox profile source code. |
| 58 const std::string profile_str_; | 58 const std::string profile_str_; |
| 59 | 59 |
| 60 DISALLOW_COPY_AND_ASSIGN(SandboxCompiler); | 60 DISALLOW_COPY_AND_ASSIGN(SandboxCompiler); |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 class CONTENT_EXPORT Sandbox { | 63 class CONTENT_EXPORT Sandbox { |
| 64 public: | 64 public: |
| 65 | 65 class Loader; |
| 66 // Warm up System APIs that empirically need to be accessed before the | 66 // Warm up System APIs that empirically need to be accessed before the |
| 67 // sandbox is turned on. |sandbox_type| is the type of sandbox to warm up. | 67 // sandbox is turned on. |sandbox_type| is the type of sandbox to warm up. |
| 68 // Valid |sandbox_type| values are defined by the enum SandboxType, or can be | 68 // Valid |sandbox_type| values are defined by the enum SandboxType, or can be |
| 69 // defined by the embedder via | 69 // defined by the embedder via |
| 70 // ContentClient::GetSandboxProfileForProcessType(). | 70 // ContentClient::GetSandboxProfileForProcessType(). |
| 71 static void SandboxWarmup(int sandbox_type); | 71 static void SandboxWarmup(int sandbox_type); |
| 72 | 72 |
| 73 // Turns on the OS X sandbox for this process. | 73 // Turns on the OS X sandbox for this process. |
| 74 // |sandbox_type| - type of Sandbox to use. See SandboxWarmup() for legal | 74 // |sandbox_type| - type of Sandbox to use. See SandboxWarmup() for legal |
| 75 // values. | 75 // values. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 FRIEND_TEST_ALL_PREFIXES(MacDirAccessSandboxTest, StringEscape); | 112 FRIEND_TEST_ALL_PREFIXES(MacDirAccessSandboxTest, StringEscape); |
| 113 FRIEND_TEST_ALL_PREFIXES(MacDirAccessSandboxTest, RegexEscape); | 113 FRIEND_TEST_ALL_PREFIXES(MacDirAccessSandboxTest, RegexEscape); |
| 114 FRIEND_TEST_ALL_PREFIXES(MacDirAccessSandboxTest, SandboxAccess); | 114 FRIEND_TEST_ALL_PREFIXES(MacDirAccessSandboxTest, SandboxAccess); |
| 115 | 115 |
| 116 DISALLOW_IMPLICIT_CONSTRUCTORS(Sandbox); | 116 DISALLOW_IMPLICIT_CONSTRUCTORS(Sandbox); |
| 117 }; | 117 }; |
| 118 | 118 |
| 119 } // namespace content | 119 } // namespace content |
| 120 | 120 |
| 121 #endif // CONTENT_COMMON_SANDBOX_MAC_H_ | 121 #endif // CONTENT_COMMON_SANDBOX_MAC_H_ |
| OLD | NEW |