| 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_SANDBOX_LINUX_H_ | 5 #ifndef CONTENT_COMMON_SANDBOX_LINUX_SANDBOX_LINUX_H_ |
| 6 #define CONTENT_COMMON_SANDBOX_LINUX_SANDBOX_LINUX_H_ | 6 #define CONTENT_COMMON_SANDBOX_LINUX_SANDBOX_LINUX_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 // sandbox host. See http://code.google.com/p/chromium/wiki/LinuxSandboxIPC | 27 // sandbox host. See http://code.google.com/p/chromium/wiki/LinuxSandboxIPC |
| 28 // This isn't the full list, values < 32 are reserved for methods called from | 28 // This isn't the full list, values < 32 are reserved for methods called from |
| 29 // Skia. | 29 // Skia. |
| 30 enum LinuxSandboxIPCMethods { | 30 enum LinuxSandboxIPCMethods { |
| 31 METHOD_GET_FONT_FAMILY_FOR_CHAR = 32, | 31 METHOD_GET_FONT_FAMILY_FOR_CHAR = 32, |
| 32 METHOD_LOCALTIME = 33, | 32 METHOD_LOCALTIME = 33, |
| 33 METHOD_GET_CHILD_WITH_INODE = 34, | 33 METHOD_GET_CHILD_WITH_INODE = 34, |
| 34 METHOD_GET_STYLE_FOR_STRIKE = 35, | 34 METHOD_GET_STYLE_FOR_STRIKE = 35, |
| 35 METHOD_MAKE_SHARED_MEMORY_SEGMENT = 36, | 35 METHOD_MAKE_SHARED_MEMORY_SEGMENT = 36, |
| 36 METHOD_MATCH_WITH_FALLBACK = 37, | 36 METHOD_MATCH_WITH_FALLBACK = 37, |
| 37 METHOD_GET_REAL_PID = 38, |
| 37 }; | 38 }; |
| 38 | 39 |
| 39 // Get our singleton instance. | 40 // Get our singleton instance. |
| 40 static LinuxSandbox* GetInstance(); | 41 static LinuxSandbox* GetInstance(); |
| 41 | 42 |
| 42 // Do some initialization that can only be done before any of the sandboxes | 43 // Do some initialization that can only be done before any of the sandboxes |
| 43 // are enabled. If using the setuid sandbox, this should be called manually | 44 // are enabled. If using the setuid sandbox, this should be called manually |
| 44 // before the setuid sandbox is engaged. | 45 // before the setuid sandbox is engaged. |
| 45 void PreinitializeSandbox(); | 46 void PreinitializeSandbox(); |
| 46 | 47 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 bool yama_is_enforcing_; // Accurate if pre_initialized_. | 119 bool yama_is_enforcing_; // Accurate if pre_initialized_. |
| 119 scoped_ptr<sandbox::SetuidSandboxClient> setuid_sandbox_client_; | 120 scoped_ptr<sandbox::SetuidSandboxClient> setuid_sandbox_client_; |
| 120 | 121 |
| 121 ~LinuxSandbox(); | 122 ~LinuxSandbox(); |
| 122 DISALLOW_IMPLICIT_CONSTRUCTORS(LinuxSandbox); | 123 DISALLOW_IMPLICIT_CONSTRUCTORS(LinuxSandbox); |
| 123 }; | 124 }; |
| 124 | 125 |
| 125 } // namespace content | 126 } // namespace content |
| 126 | 127 |
| 127 #endif // CONTENT_COMMON_SANDBOX_LINUX_SANDBOX_LINUX_H_ | 128 #endif // CONTENT_COMMON_SANDBOX_LINUX_SANDBOX_LINUX_H_ |
| OLD | NEW |