mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-04-12 18:11:09 +02:00
Propagate logging command-line parameters to all processes (issue #717).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@774 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
0d086ee6fb
commit
e620a6831f
@ -93,23 +93,33 @@ void CefContentBrowserClient::RenderProcessHostCreated(
|
|||||||
|
|
||||||
void CefContentBrowserClient::AppendExtraCommandLineSwitches(
|
void CefContentBrowserClient::AppendExtraCommandLineSwitches(
|
||||||
CommandLine* command_line, int child_process_id) {
|
CommandLine* command_line, int child_process_id) {
|
||||||
|
const CommandLine& browser_cmd = *CommandLine::ForCurrentProcess();
|
||||||
|
|
||||||
|
{
|
||||||
|
// Propagate the following switches to all command lines (along with any
|
||||||
|
// associated values) if present in the browser command line.
|
||||||
|
static const char* const kSwitchNames[] = {
|
||||||
|
switches::kLogFile,
|
||||||
|
switches::kLogSeverity,
|
||||||
|
};
|
||||||
|
command_line->CopySwitchesFrom(browser_cmd, kSwitchNames,
|
||||||
|
arraysize(kSwitchNames));
|
||||||
|
}
|
||||||
|
|
||||||
std::string process_type =
|
std::string process_type =
|
||||||
command_line->GetSwitchValueASCII(switches::kProcessType);
|
command_line->GetSwitchValueASCII(switches::kProcessType);
|
||||||
if (process_type == switches::kRendererProcess) {
|
if (process_type == switches::kRendererProcess) {
|
||||||
// Propagate the following switches to the renderer command line (along
|
// Propagate the following switches to the renderer command line (along with
|
||||||
// with any associated values) if present in the browser command line.
|
// any associated values) if present in the browser command line.
|
||||||
static const char* const kSwitchNames[] = {
|
static const char* const kSwitchNames[] = {
|
||||||
switches::kLogFile,
|
switches::kProductVersion,
|
||||||
switches::kLogSeverity,
|
switches::kLocale,
|
||||||
switches::kProductVersion,
|
switches::kResourcesDirPath,
|
||||||
switches::kLocale,
|
switches::kLocalesDirPath,
|
||||||
switches::kResourcesDirPath,
|
switches::kPackLoadingDisabled,
|
||||||
switches::kLocalesDirPath,
|
};
|
||||||
switches::kPackLoadingDisabled,
|
command_line->CopySwitchesFrom(browser_cmd, kSwitchNames,
|
||||||
};
|
arraysize(kSwitchNames));
|
||||||
const CommandLine& browser_cmd = *CommandLine::ForCurrentProcess();
|
|
||||||
command_line->CopySwitchesFrom(browser_cmd, kSwitchNames,
|
|
||||||
arraysize(kSwitchNames));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user