summaryrefslogtreecommitdiffstats
path: root/content/browser
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-03 20:09:10 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-03 20:09:10 +0000
commitcc9a9a88d5da672b09285ead7e604b6d7b77fd3d (patch)
tree9e347b635139c3a20253e27c395dd93157750ddb /content/browser
parent10a749306e5212cc96a32fe9006c2a8d04606736 (diff)
downloadchromium_src-cc9a9a88d5da672b09285ead7e604b6d7b77fd3d.zip
chromium_src-cc9a9a88d5da672b09285ead7e604b6d7b77fd3d.tar.gz
chromium_src-cc9a9a88d5da672b09285ead7e604b6d7b77fd3d.tar.bz2
Move content specific switches to content, in preparation for moving directories that currently depend on common (like gpu).
TBR=bradnelson Review URL: http://codereview.chromium.org/6603011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76785 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser')
-rw-r--r--content/browser/zygote_main_linux.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/content/browser/zygote_main_linux.cc b/content/browser/zygote_main_linux.cc
index 188ad34..4793281 100644
--- a/content/browser/zygote_main_linux.cc
+++ b/content/browser/zygote_main_linux.cc
@@ -674,7 +674,8 @@ static bool EnterSandbox() {
return false;
}
}
- } else if (switches::SeccompSandboxEnabled()) {
+ } else if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableSeccompSandbox)) {
PreSandboxInit();
SkiaFontConfigSetImplementation(
new FontConfigIPC(kMagicSandboxIPCDescriptor));
@@ -703,7 +704,8 @@ bool ZygoteMain(const MainFunctionParams& params) {
// The seccomp sandbox needs access to files in /proc, which might be denied
// after one of the other sandboxes have been started. So, obtain a suitable
// file handle in advance.
- if (switches::SeccompSandboxEnabled()) {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableSeccompSandbox)) {
g_proc_fd = open("/proc", O_DIRECTORY | O_RDONLY);
if (g_proc_fd < 0) {
LOG(ERROR) << "WARNING! Cannot access \"/proc\". Disabling seccomp "
@@ -731,7 +733,8 @@ bool ZygoteMain(const MainFunctionParams& params) {
// The seccomp sandbox will be turned on when the renderers start. But we can
// already check if sufficient support is available so that we only need to
// print one error message for the entire browser session.
- if (g_proc_fd >= 0 && switches::SeccompSandboxEnabled()) {
+ if (g_proc_fd >= 0 && CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableSeccompSandbox)) {
if (!SupportsSeccompSandbox(g_proc_fd)) {
// There are a good number of users who cannot use the seccomp sandbox
// (e.g. because their distribution does not enable seccomp mode by