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-05 01:16:28 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-05 01:16:28 +0000
commitb4e3e8d5c6848f6175345f623a44e92c4ef4ff89 (patch)
tree9218fc83df831d3da719fd35c47f349b3c4e6353 /webkit/glue/user_agent.cc
parent89ea2c981c728cee386b5353e78ab9a6d4077742 (diff)
downloadchromium_src-b4e3e8d5c6848f6175345f623a44e92c4ef4ff89.zip
chromium_src-b4e3e8d5c6848f6175345f623a44e92c4ef4ff89.tar.gz
chromium_src-b4e3e8d5c6848f6175345f623a44e92c4ef4ff89.tar.bz2
Add 64-bit Windows tokens to the UA string. This parallels https://bugs.webkit.org/show_bug.cgi?id=55226 as well as Firefox and IE.
BUG=none TEST=none Review URL: http://codereview.chromium.org/6627019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77012 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/user_agent.cc')
-rw-r--r--webkit/glue/user_agent.cc23
1 files changed, 21 insertions, 2 deletions
diff --git a/webkit/glue/user_agent.cc b/webkit/glue/user_agent.cc
index 88d8038..04fab21 100644
--- a/webkit/glue/user_agent.cc
+++ b/webkit/glue/user_agent.cc
@@ -12,6 +12,10 @@
#include "base/stringprintf.h"
#include "base/sys_info.h"
+#if defined(OS_WIN)
+#include "base/win/windows_version.h"
+#endif
+
// Generated
#include "webkit_version.h" // NOLINT
@@ -58,12 +62,27 @@ std::string BuildOSCpuInfo() {
}
#endif
+#if defined(OS_WIN)
+ std::string architecture_token;
+ if (base::win::GetWOW64Status() == base::win::WOW64_ENABLED) {
+ architecture_token = "; WOW64";
+ } else {
+ base::win::WindowsArchitecture windows_architecture =
+ base::win::GetWindowsArchitecture();
+ if (windows_architecture == base::win::X64_ARCHITECTURE)
+ architecture_token = "; Win64; x64";
+ else if (windows_architecture == base::win::IA64_ARCHITECTURE)
+ architecture_token = "; Win64; IA64";
+ }
+#endif
+
base::StringAppendF(
&os_cpu,
#if defined(OS_WIN)
- "Windows NT %d.%d",
+ "Windows NT %d.%d%s",
os_major_version,
- os_minor_version
+ os_minor_version,
+ architecture_token.c_str()
#elif defined(OS_MACOSX)
"Intel Mac OS X %d_%d_%d",
os_major_version,