summaryrefslogtreecommitdiffstats
path: root/webkit/glue/user_agent.cc
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-03 19:49:47 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-03 19:49:47 +0000
commit3c2952a38f505358c9421781cb7374381e1abc1e (patch)
tree4984ba80cd43bb1834b174842bbd189373808c61 /webkit/glue/user_agent.cc
parentca002f150b3bf2ad55113ac1d093630aa79025d8 (diff)
downloadchromium_src-3c2952a38f505358c9421781cb7374381e1abc1e.zip
chromium_src-3c2952a38f505358c9421781cb7374381e1abc1e.tar.gz
chromium_src-3c2952a38f505358c9421781cb7374381e1abc1e.tar.bz2
Drop "Windows;" from the UA string. This parallels https://bugs.webkit.org/show_bug.cgi?id=54567 and also matches a change in Firefox 4.
BUG=none TEST=none Review URL: http://codereview.chromium.org/6581054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76775 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/user_agent.cc')
-rw-r--r--webkit/glue/user_agent.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/webkit/glue/user_agent.cc b/webkit/glue/user_agent.cc
index d79e678..88d8038 100644
--- a/webkit/glue/user_agent.cc
+++ b/webkit/glue/user_agent.cc
@@ -71,7 +71,7 @@ std::string BuildOSCpuInfo() {
os_bugfix_version
#elif defined(OS_CHROMEOS)
"CrOS %s %d.%d.%d",
- cputype.c_str(), // e.g. i686
+ cputype.c_str(), // e.g. i686
os_major_version,
os_minor_version,
os_bugfix_version
@@ -88,13 +88,13 @@ std::string BuildOSCpuInfo() {
void BuildUserAgent(bool mimic_windows, std::string* result) {
const char kUserAgentPlatform[] =
#if defined(OS_WIN)
- "Windows";
+ "";
#elif defined(OS_MACOSX)
- "Macintosh";
+ "Macintosh; ";
#elif defined(USE_X11)
- "X11"; // strange, but that's what Firefox uses
+ "X11; "; // strange, but that's what Firefox uses
#else
- "?";
+ "Unknown; ";
#endif
// Get the product name and version, and replace Safari's Version/X string
@@ -105,10 +105,10 @@ void BuildUserAgent(bool mimic_windows, std::string* result) {
// Derived from Safari's UA string.
base::StringAppendF(
result,
- "Mozilla/5.0 (%s; %s) AppleWebKit/%d.%d"
+ "Mozilla/5.0 (%s%s) AppleWebKit/%d.%d"
" (KHTML, like Gecko) %s Safari/%d.%d",
- mimic_windows ? "Windows" : kUserAgentPlatform,
- ((mimic_windows ? "Windows " : "") + BuildOSCpuInfo()).c_str(),
+ mimic_windows ? "Windows " : kUserAgentPlatform,
+ BuildOSCpuInfo().c_str(),
WEBKIT_VERSION_MAJOR,
WEBKIT_VERSION_MINOR,
product.c_str(),