Fix crash on app list start page keyboard navigation with <4 apps.
[chromium-blink-merge.git] / sandbox / linux / suid / common / sandbox.h
blob99eb7b512070e79ca4fe78097e21308b8fab4eda
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
3 // found in the LICENSE file.
5 #ifndef SANDBOX_LINUX_SUID_SANDBOX_H_
6 #define SANDBOX_LINUX_SUID_SANDBOX_H_
8 #if defined(__cplusplus)
9 namespace sandbox {
10 #endif
12 // These are command line switches that may be used by other programs
13 // (e.g. Chrome) to construct a command line for the sandbox.
14 static const char kSuidSandboxGetApiSwitch[] = "--get-api";
15 static const char kAdjustOOMScoreSwitch[] = "--adjust-oom-score";
17 static const char kSandboxDescriptorEnvironmentVarName[] = "SBX_D";
18 static const char kSandboxHelperPidEnvironmentVarName[] = "SBX_HELPER_PID";
20 static const long kSUIDSandboxApiNumber = 1;
21 static const char kSandboxEnvironmentApiRequest[] = "SBX_CHROME_API_RQ";
22 static const char kSandboxEnvironmentApiProvides[] = "SBX_CHROME_API_PRV";
24 // This number must be kept in sync with common/zygote_commands_linux.h
25 static const int kZygoteIdFd = 7;
27 // These are the magic byte values which the sandboxed process uses to request
28 // that it be chrooted.
29 static const char kMsgChrootMe = 'C';
30 static const char kMsgChrootSuccessful = 'O';
32 // These are set if we have respectively switched to a new PID or NET namespace
33 // by going through the setuid binary helper.
34 static const char kSandboxPIDNSEnvironmentVarName[] = "SBX_PID_NS";
35 static const char kSandboxNETNSEnvironmentVarName[] = "SBX_NET_NS";
37 #if defined(__cplusplus)
38 } // namespace sandbox
39 #endif
41 #endif // SANDBOX_LINUX_SUID_SANDBOX_H_