| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "webkit/glue/user_agent.h" | 5 #include "webkit/glue/user_agent.h" |
| 6 | 6 |
| 7 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 7 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 8 #include <sys/utsname.h> | 8 #include <sys/utsname.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| 11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 if (strcmp(unixinfo.machine, "x86_64") == 0 && | 57 if (strcmp(unixinfo.machine, "x86_64") == 0 && |
| 58 sizeof(void*) == sizeof(int32)) { // NOLINT | 58 sizeof(void*) == sizeof(int32)) { // NOLINT |
| 59 cputype.assign("i686 (x86_64)"); | 59 cputype.assign("i686 (x86_64)"); |
| 60 } else { | 60 } else { |
| 61 cputype.assign(unixinfo.machine); | 61 cputype.assign(unixinfo.machine); |
| 62 } | 62 } |
| 63 #endif | 63 #endif |
| 64 | 64 |
| 65 #if defined(OS_WIN) | 65 #if defined(OS_WIN) |
| 66 std::string architecture_token; | 66 std::string architecture_token; |
| 67 base::win::OSInfo* os_info = base::win::OSInfo::GetInstance(); | 67 if (base::win::GetWOW64Status() == base::win::WOW64_ENABLED) { |
| 68 if (os_info->wow64_status() == base::win::OSInfo::WOW64_ENABLED) { | |
| 69 architecture_token = "; WOW64"; | 68 architecture_token = "; WOW64"; |
| 70 } else { | 69 } else { |
| 71 base::win::OSInfo::WindowsArchitecture windows_architecture = | 70 base::win::WindowsArchitecture windows_architecture = |
| 72 os_info->architecture(); | 71 base::win::GetWindowsArchitecture(); |
| 73 if (windows_architecture == base::win::OSInfo::X64_ARCHITECTURE) | 72 if (windows_architecture == base::win::X64_ARCHITECTURE) |
| 74 architecture_token = "; Win64; x64"; | 73 architecture_token = "; Win64; x64"; |
| 75 else if (windows_architecture == base::win::OSInfo::IA64_ARCHITECTURE) | 74 else if (windows_architecture == base::win::IA64_ARCHITECTURE) |
| 76 architecture_token = "; Win64; IA64"; | 75 architecture_token = "; Win64; IA64"; |
| 77 } | 76 } |
| 78 #endif | 77 #endif |
| 79 | 78 |
| 80 base::StringAppendF( | 79 base::StringAppendF( |
| 81 &os_cpu, | 80 &os_cpu, |
| 82 #if defined(OS_WIN) | 81 #if defined(OS_WIN) |
| 83 "Windows NT %d.%d%s", | 82 "Windows NT %d.%d%s", |
| 84 os_major_version, | 83 os_major_version, |
| 85 os_minor_version, | 84 os_minor_version, |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 BuildOSCpuInfo().c_str(), | 134 BuildOSCpuInfo().c_str(), |
| 136 WEBKIT_VERSION_MAJOR, | 135 WEBKIT_VERSION_MAJOR, |
| 137 WEBKIT_VERSION_MINOR, | 136 WEBKIT_VERSION_MINOR, |
| 138 product.c_str(), | 137 product.c_str(), |
| 139 WEBKIT_VERSION_MAJOR, | 138 WEBKIT_VERSION_MAJOR, |
| 140 WEBKIT_VERSION_MINOR); | 139 WEBKIT_VERSION_MINOR); |
| 141 } | 140 } |
| 142 | 141 |
| 143 } // namespace webkit_glue | 142 } // namespace webkit_glue |
| 144 | 143 |
| OLD | NEW |