diff options
Diffstat (limited to 'chrome_frame/html_utils.cc')
-rw-r--r-- | chrome_frame/html_utils.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/chrome_frame/html_utils.cc b/chrome_frame/html_utils.cc index 25e4829..9458166 100644 --- a/chrome_frame/html_utils.cc +++ b/chrome_frame/html_utils.cc @@ -10,6 +10,7 @@ #include "base/string_util.h" #include "base/string_tokenizer.h" #include "base/stringprintf.h" +#include "chrome/common/chrome_version_info.h" #include "chrome_frame/utils.h" #include "net/base/net_util.h" #include "webkit/glue/user_agent.h" @@ -378,7 +379,14 @@ const char* GetChromeUserAgent() { _pAtlModule->m_csStaticDataInitAndTypeInfo.Lock(); if (!g_chrome_user_agent[0]) { std::string ua; - webkit_glue::BuildUserAgent(false, &ua); + + chrome::VersionInfo version_info; + std::string product("Chrome/"); + product += version_info.is_valid() ? version_info.Version() + : "0.0.0.0"; + + ua = webkit_glue::BuildUserAgentHelper(false, product); + DCHECK(ua.length() < arraysize(g_chrome_user_agent)); lstrcpynA(g_chrome_user_agent, ua.c_str(), arraysize(g_chrome_user_agent) - 1); |