diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-26 02:49:42 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-26 02:49:42 +0000 |
commit | 56d0cefa32d24d3222bee3615c6f7e0e772b6977 (patch) | |
tree | 91257b88907b8122316a61100205d08401fa4992 /base/sys_info_posix.cc | |
parent | 853493a340e81c4220844ec192b4d70572c4e90f (diff) | |
download | chromium_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_posix.cc')
-rw-r--r-- | base/sys_info_posix.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/base/sys_info_posix.cc b/base/sys_info_posix.cc index 3a6bd62..73a7108 100644 --- a/base/sys_info_posix.cc +++ b/base/sys_info_posix.cc @@ -79,7 +79,13 @@ std::string SysInfo::CPUArchitecture() { NOTREACHED(); return ""; } - return std::string(info.machine); + std::string arch(info.machine); + if (arch == "i386" || arch == "i486" || arch == "i586" || arch == "i686") { + arch = "x86"; + } else if (arch == "amd64") { + arch = "x86_64"; + } + return arch; } // static |