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_LINUX_H_ | 5 #ifndef CONTENT_COMMON_SANDBOX_LINUX_H_ |
6 #define CONTENT_COMMON_SANDBOX_LINUX_H_ | 6 #define CONTENT_COMMON_SANDBOX_LINUX_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 | 38 |
39 // Do some initialization that can only be done before any of the sandboxes | 39 // Do some initialization that can only be done before any of the sandboxes |
40 // is enabled. | 40 // is enabled. |
41 // | 41 // |
42 // There are two versions of this function. One takes a process_type | 42 // There are two versions of this function. One takes a process_type |
43 // as an argument, the other doesn't. | 43 // as an argument, the other doesn't. |
44 // It may be necessary to call PreinitializeSandboxBegin before knowing the | 44 // It may be necessary to call PreinitializeSandboxBegin before knowing the |
45 // process type (this is for instance the case with the Zygote). | 45 // process type (this is for instance the case with the Zygote). |
46 // In that case, it is crucial that PreinitializeSandboxFinish() gets | 46 // In that case, it is crucial that PreinitializeSandboxFinish() gets |
47 // called for every child process. | 47 // called for every child process. |
48 // TODO(markus,jln) we know this is not always done at the moment | 48 // TODO(markus, jln) we know this is not always done at the moment |
49 // (crbug.com/139877). | 49 // (crbug.com/139877). |
50 void PreinitializeSandbox(const std::string& process_type); | 50 void PreinitializeSandbox(const std::string& process_type); |
51 // These should be called together. | 51 // These should be called together. |
52 void PreinitializeSandboxBegin(); | 52 void PreinitializeSandboxBegin(); |
53 void PreinitializeSandboxFinish(const std::string& process_type); | 53 void PreinitializeSandboxFinish(const std::string& process_type); |
54 | 54 |
55 // Returns the Status of the sandbox. Can only be queried if we went through | 55 // Returns the Status of the sandbox. Can only be queried if we went through |
56 // PreinitializeSandbox() or PreinitializeSandboxBegin(). This is a bitmask | 56 // PreinitializeSandbox() or PreinitializeSandboxBegin(). This is a bitmask |
57 // and uses the constants defined in "enum LinuxSandboxStatus". | 57 // and uses the constants defined in "enum LinuxSandboxStatus". |
58 // Since we need to provide the status before the sandboxes are actually | 58 // Since we need to provide the status before the sandboxes are actually |
(...skipping 29 matching lines...) Expand all Loading... |
88 scoped_ptr<sandbox::SetuidSandboxClient> setuid_sandbox_client_; | 88 scoped_ptr<sandbox::SetuidSandboxClient> setuid_sandbox_client_; |
89 | 89 |
90 ~LinuxSandbox(); | 90 ~LinuxSandbox(); |
91 DISALLOW_IMPLICIT_CONSTRUCTORS(LinuxSandbox); | 91 DISALLOW_IMPLICIT_CONSTRUCTORS(LinuxSandbox); |
92 }; | 92 }; |
93 | 93 |
94 } // namespace content | 94 } // namespace content |
95 | 95 |
96 #endif // CONTENT_COMMON_SANDBOX_LINUX_H_ | 96 #endif // CONTENT_COMMON_SANDBOX_LINUX_H_ |
97 | 97 |
OLD | NEW |