Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(611)

Side by Side Diff: content/common/sandbox_mac.h

Issue 2507283002: Add warmup and sandbox file-read permission for testing
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/common/sandbox_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | content/common/sandbox_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698