summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chrome_content_browser_client.cc
diff options
context:
space:
mode:
authorvitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-10 18:11:35 +0000
committervitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-10 18:11:35 +0000
commit7c9b6f96f30247c5d88d124bbd53d8d2791f2414 (patch)
treef866a3c81b3a88ef3ca512ee2ea1ea678bbd5d50 /chrome/browser/chrome_content_browser_client.cc
parentbd0ef5332becaefd3a3abf31d0fd409865aa92f3 (diff)
downloadchromium_src-7c9b6f96f30247c5d88d124bbd53d8d2791f2414.zip
chromium_src-7c9b6f96f30247c5d88d124bbd53d8d2791f2414.tar.gz
chromium_src-7c9b6f96f30247c5d88d124bbd53d8d2791f2414.tar.bz2
Set --user-data-dir for utility process to make sure it logs to correct chrome_debug.log file.
Review URL: https://chromiumcodereview.appspot.com/23869003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222309 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chrome_content_browser_client.cc')
-rw-r--r--chrome/browser/chrome_content_browser_client.cc18
1 files changed, 6 insertions, 12 deletions
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 5f8c5d2..60c6942 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -1331,14 +1331,14 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
command_line->GetSwitchValueASCII(switches::kProcessType);
const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
- if (browser_command_line.HasSwitch(switches::kChromeFrame))
- command_line->AppendSwitch(switches::kChromeFrame);
+ static const char* const kCommonSwitchNames[] = {
+ switches::kChromeFrame,
+ switches::kUserDataDir, // Make logs go to the right file.
+ };
+ command_line->CopySwitchesFrom(browser_command_line, kCommonSwitchNames,
+ arraysize(kCommonSwitchNames));
if (process_type == switches::kRendererProcess) {
- base::FilePath user_data_dir =
- browser_command_line.GetSwitchValuePath(switches::kUserDataDir);
- if (!user_data_dir.empty())
- command_line->AppendSwitchPath(switches::kUserDataDir, user_data_dir);
#if defined(OS_CHROMEOS)
const std::string& login_profile =
browser_command_line.GetSwitchValueASCII(
@@ -1464,14 +1464,12 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
#endif
switches::kMemoryProfiling,
switches::kSilentDumpOnDCHECK,
- switches::kUserDataDir,
};
command_line->CopySwitchesFrom(browser_command_line, kSwitchNames,
arraysize(kSwitchNames));
} else if (process_type == switches::kZygoteProcess) {
static const char* const kSwitchNames[] = {
- switches::kUserDataDir, // Make logs go to the right file.
// Load (in-process) Pepper plugins in-process in the zygote pre-sandbox.
switches::kDisableBundledPpapiFlash,
switches::kPpapiFlashInProcess,
@@ -1482,10 +1480,6 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
command_line->CopySwitchesFrom(browser_command_line, kSwitchNames,
arraysize(kSwitchNames));
} else if (process_type == switches::kGpuProcess) {
- base::FilePath user_data_dir =
- browser_command_line.GetSwitchValuePath(switches::kUserDataDir);
- if (!user_data_dir.empty())
- command_line->AppendSwitchPath(switches::kUserDataDir, user_data_dir);
// If --ignore-gpu-blacklist is passed in, don't send in crash reports
// because GPU is expected to be unreliable.
if (browser_command_line.HasSwitch(switches::kIgnoreGpuBlacklist) &&