summaryrefslogtreecommitdiffstats
path: root/base/sys_info_win.cc
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-26 02:49:42 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-26 02:49:42 +0000
commit56d0cefa32d24d3222bee3615c6f7e0e772b6977 (patch)
tree91257b88907b8122316a61100205d08401fa4992 /base/sys_info_win.cc
parent853493a340e81c4220844ec192b4d70572c4e90f (diff)
downloadchromium_src-56d0cefa32d24d3222bee3615c6f7e0e772b6977.zip
chromium_src-56d0cefa32d24d3222bee3615c6f7e0e772b6977.tar.gz
chromium_src-56d0cefa32d24d3222bee3615c6f7e0e772b6977.tar.bz2
Implement SysInfo::CPUArchitecture() on Windows. Try to make Windows and POSIX versions return consistent architecture names.
Review URL: https://chromiumcodereview.appspot.com/10910247 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158726 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/sys_info_win.cc')
-rw-r--r--base/sys_info_win.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/base/sys_info_win.cc b/base/sys_info_win.cc
index d8de736..f5fa7d7 100644
--- a/base/sys_info_win.cc
+++ b/base/sys_info_win.cc
@@ -75,8 +75,18 @@ std::string SysInfo::OperatingSystemVersion() {
// static
std::string SysInfo::CPUArchitecture() {
- // TODO: Make this vary when we support any other architectures.
- return "x86";
+ win::OSInfo::WindowsArchitecture arch =
+ win::OSInfo::GetInstance()->architecture();
+ switch (arch) {
+ case win::OSInfo::X86_ARCHITECTURE:
+ return "x86";
+ case win::OSInfo::X64_ARCHITECTURE:
+ return "x86_64";
+ case win::OSInfo::IA64_ARCHITECTURE:
+ return "ia64";
+ default:
+ return "";
+ }
}
// static