mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-22 06:57:42 +01:00
Fix configuration of the User-Agent string during startup (issue #1275).
git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/2062@1898 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
3f518f58fa
commit
1fc8b65828
@ -668,8 +668,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…
x
Reference in New Issue
Block a user