summaryrefslogtreecommitdiffstats
path: root/chrome/browser/zygote_host_linux.cc
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-12 00:33:34 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-12 00:33:34 +0000
commit0d4f8f71ef1f07376f1b005981ecb6ef35921331 (patch)
treef3ca92b90cb426af4b219b67cd28c5f370f4e720 /chrome/browser/zygote_host_linux.cc
parent42a1c17896d599a86112bcecffe71df27434611c (diff)
downloadchromium_src-0d4f8f71ef1f07376f1b005981ecb6ef35921331.zip
chromium_src-0d4f8f71ef1f07376f1b005981ecb6ef35921331.tar.gz
chromium_src-0d4f8f71ef1f07376f1b005981ecb6ef35921331.tar.bz2
Linux: Pass --user-data-dir to the Zygote.
BUG=none TEST=On Linux, "chrome --enable-logging --user-data-dir=/tmp/foobar" writes renderer logs to chrome_debug.log in /tmp/foobar rather than in $XDG_CONFIG_HOME. Review URL: http://codereview.chromium.org/885003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41369 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/zygote_host_linux.cc')
-rw-r--r--chrome/browser/zygote_host_linux.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/zygote_host_linux.cc b/chrome/browser/zygote_host_linux.cc
index 3b6a160..96506bb 100644
--- a/chrome/browser/zygote_host_linux.cc
+++ b/chrome/browser/zygote_host_linux.cc
@@ -97,6 +97,12 @@ void ZygoteHost::Init(const std::string& sandbox_cmd) {
browser_command_line.GetSwitchValueASCII(
switches::kEnableLogging));
}
+ if (browser_command_line.HasSwitch(switches::kUserDataDir)) {
+ // Append with value so logs go to the right file.
+ cmd_line.AppendSwitchWithValue(switches::kUserDataDir,
+ browser_command_line.GetSwitchValueASCII(
+ switches::kUserDataDir));
+ }
if (browser_command_line.HasSwitch(switches::kEnableSeccompSandbox)) {
cmd_line.AppendSwitch(switches::kEnableSeccompSandbox);
}