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.h | |
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.h')
-rw-r--r-- | base/sys_info.h | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/base/sys_info.h b/base/sys_info.h index e5917f1..e155285 100644 --- a/base/sys_info.h +++ b/base/sys_info.h @@ -5,14 +5,13 @@ #ifndef BASE_SYS_INFO_H_ #define BASE_SYS_INFO_H_ +#include <string> + #include "base/base_export.h" #include "base/basictypes.h" #include "base/file_path.h" #include "base/time.h" - -#include <string> - -class FilePath; +#include "build/build_config.h" namespace base { @@ -51,10 +50,15 @@ class BASE_EXPORT SysInfo { int32* minor_version, int32* bugfix_version); - // Returns the CPU architecture of the system. Exact return value may differ - // across platforms. + // Returns the architecture of the running operating system. + // Exact return value may differ across platforms. + // e.g. a 32-bit x86 kernel on a 64-bit capable CPU will return "x86", + // whereas a x86-64 kernel on the same CPU will return "x86_64" + // TODO(thestig) Rename this to OperatingSystemArchitecture(). static std::string CPUArchitecture(); + // Avoid using this. Use base/cpu.h to get information about the CPU instead. + // http://crbug.com/148884 // Returns the CPU model name of the system. If it can not be figured out, // an empty string is returned. static std::string CPUModelName(); @@ -66,7 +70,7 @@ class BASE_EXPORT SysInfo { #if defined(OS_POSIX) && !defined(OS_MACOSX) // Returns the maximum SysV shared memory segment size. static size_t MaxSharedMemorySize(); -#endif // defined(OS_POSIX) && !defined(OS_MACOSX) +#endif // defined(OS_POSIX) && !defined(OS_MACOSX) #if defined(OS_CHROMEOS) // Returns the name of the version entry we wish to look up in the @@ -82,7 +86,7 @@ class BASE_EXPORT SysInfo { // Returns the path to the lsb-release file. static FilePath GetLsbReleaseFilePath(); -#endif // defined(OS_CHROMEOS) +#endif // defined(OS_CHROMEOS) #if defined(OS_ANDROID) // Returns the Android build's codename. @@ -95,7 +99,7 @@ class BASE_EXPORT SysInfo { static std::string GetDeviceName(); static int DalvikHeapSizeMB(); -#endif // defined(OS_ANDROID) +#endif // defined(OS_ANDROID) }; } // namespace base |