Fix configuration of the User-Agent string during startup (issue #1275).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1896 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
b7ad182732
commit
b1026cc191
|
@ -686,8 +686,9 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches(
|
|||
switches::kLocalesDirPath,
|
||||
switches::kLogFile,
|
||||
switches::kLogSeverity,
|
||||
switches::kResourcesDirPath,
|
||||
switches::kProductVersion,
|
||||
switches::kResourcesDirPath,
|
||||
switches::kUserAgent,
|
||||
};
|
||||
command_line->CopySwitchesFrom(browser_cmd, kSwitchNames,
|
||||
arraysize(kSwitchNames));
|
||||
|
|
|
@ -114,6 +114,9 @@ std::string CefContentClient::GetUserAgent() const {
|
|||
std::string product_version;
|
||||
|
||||
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
|
||||
if (command_line.HasSwitch(switches::kUserAgent))
|
||||
return command_line.GetSwitchValueASCII(switches::kUserAgent);
|
||||
|
||||
if (command_line.HasSwitch(switches::kProductVersion)) {
|
||||
product_version =
|
||||
command_line.GetSwitchValueASCII(switches::kProductVersion);
|
||||
|
|
Loading…
Reference in New Issue