Commit adb9ded6 authored by wtc@chromium.org's avatar wtc@chromium.org

Remove the initial space in the QUIC user agent ID.

If chrome::VersionInfo::GetVersionStringModifier() returns an empty
string (which is the case for the Stable channel and any unofficial
builds), don't append a space.

R=rtenneti@chromium.org,thestig@chromium.org
BUG=none

Review URL: https://codereview.chromium.org/420613004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285529 0039d316-1c4b-4281-b951-d872f2087c98
parent 1c986af1
...@@ -1171,7 +1171,8 @@ void IOThread::ConfigureQuicGlobals( ...@@ -1171,7 +1171,8 @@ void IOThread::ConfigureQuicGlobals(
std::string quic_user_agent_id = std::string quic_user_agent_id =
chrome::VersionInfo::GetVersionStringModifier(); chrome::VersionInfo::GetVersionStringModifier();
quic_user_agent_id.append(1, ' '); if (!quic_user_agent_id.empty())
quic_user_agent_id.push_back(' ');
chrome::VersionInfo version_info; chrome::VersionInfo version_info;
quic_user_agent_id.append(version_info.ProductNameAndVersionForUserAgent()); quic_user_agent_id.append(version_info.ProductNameAndVersionForUserAgent());
globals->quic_user_agent_id.set(quic_user_agent_id); globals->quic_user_agent_id.set(quic_user_agent_id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment