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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/hash_tables.h" | 11 #include "base/hash_tables.h" |
12 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
14 #include "content/public/common/sandbox_type_mac.h" | 14 #include "content/public/common/sandbox_type_mac.h" |
15 | 15 |
16 class FilePath; | 16 class FilePath; |
17 | 17 |
18 #if __OBJC__ | 18 #if __OBJC__ |
19 @class NSArray; | 19 @class NSArray; |
20 @class NSString; | 20 @class NSString; |
21 #else | 21 #else |
22 class NSArray; | 22 class NSArray; |
23 class NSString; | 23 class NSString; |
24 #endif | 24 #endif |
25 | 25 |
26 namespace sandbox { | 26 namespace content { |
27 | 27 |
28 // Class representing a substring of the sandbox profile tagged with its type. | 28 // Class representing a substring of the sandbox profile tagged with its type. |
29 class SandboxSubstring { | 29 class SandboxSubstring { |
cpu_(ooo_6.6-7.5)
2012/10/23 19:40:15
would it be too much trouble to move this stuff in
| |
30 public: | 30 public: |
31 enum SandboxSubstringType { | 31 enum SandboxSubstringType { |
32 PLAIN, // Just a plain string, no escaping necessary. | 32 PLAIN, // Just a plain string, no escaping necessary. |
33 LITERAL, // Escape for use in (literal ...) expression. | 33 LITERAL, // Escape for use in (literal ...) expression. |
34 REGEX, // Escape for use in (regex ...) expression. | 34 REGEX, // Escape for use in (regex ...) expression. |
35 }; | 35 }; |
36 | 36 |
37 SandboxSubstring() {} | 37 SandboxSubstring() {} |
38 | 38 |
39 explicit SandboxSubstring(const std::string& value) | 39 explicit SandboxSubstring(const std::string& value) |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
153 // This path is not necessarily unique e.g. in the face of hardlinks. | 153 // This path is not necessarily unique e.g. in the face of hardlinks. |
154 static FilePath GetCanonicalSandboxPath(const FilePath& path); | 154 static FilePath GetCanonicalSandboxPath(const FilePath& path); |
155 | 155 |
156 FRIEND_TEST_ALL_PREFIXES(MacDirAccessSandboxTest, StringEscape); | 156 FRIEND_TEST_ALL_PREFIXES(MacDirAccessSandboxTest, StringEscape); |
157 FRIEND_TEST_ALL_PREFIXES(MacDirAccessSandboxTest, RegexEscape); | 157 FRIEND_TEST_ALL_PREFIXES(MacDirAccessSandboxTest, RegexEscape); |
158 FRIEND_TEST_ALL_PREFIXES(MacDirAccessSandboxTest, SandboxAccess); | 158 FRIEND_TEST_ALL_PREFIXES(MacDirAccessSandboxTest, SandboxAccess); |
159 | 159 |
160 DISALLOW_IMPLICIT_CONSTRUCTORS(Sandbox); | 160 DISALLOW_IMPLICIT_CONSTRUCTORS(Sandbox); |
161 }; | 161 }; |
162 | 162 |
163 } // namespace sandbox | 163 } // namespace content |
164 | 164 |
165 #endif // CONTENT_COMMON_SANDBOX_MAC_H_ | 165 #endif // CONTENT_COMMON_SANDBOX_MAC_H_ |
OLD | NEW |