diff options
author | deanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-18 12:18:14 +0000 |
---|---|---|
committer | deanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-18 12:18:14 +0000 |
commit | fadf97f2f16f6b3ad2756cd07657c4f47172da92 (patch) | |
tree | ba24cf444ef2696e32639d51ef30e9f0d96df330 /chrome/common | |
parent | 1918c4e12cea21c56d5d9e07f3759de6ad9e3dd3 (diff) | |
download | chromium_src-fadf97f2f16f6b3ad2756cd07657c4f47172da92.zip chromium_src-fadf97f2f16f6b3ad2756cd07657c4f47172da92.tar.gz chromium_src-fadf97f2f16f6b3ad2756cd07657c4f47172da92.tar.bz2 |
Add cross platform base::SysInfo::AmountOfPhysicalMemoryMB to replace the Windows only env_util::GetPhysicalMemoryMB.
From Seo Sanghyeon.
Review URL: http://codereview.chromium.org/2962
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2358 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/env_util.cc | 12 | ||||
-rw-r--r-- | chrome/common/env_util.h | 3 |
2 files changed, 0 insertions, 15 deletions
diff --git a/chrome/common/env_util.cc b/chrome/common/env_util.cc index 43b9bff..3af22a6 100644 --- a/chrome/common/env_util.cc +++ b/chrome/common/env_util.cc @@ -7,8 +7,6 @@ #include "base/basictypes.h" #include "base/logging.h" -static const DWORDLONG kBytesPerMegabyte = 1048576; - namespace env_util { std::string GetOperatingSystemName() { @@ -27,16 +25,6 @@ std::string GetOperatingSystemVersion() { return std::string(result); } -int GetPhysicalMemoryMB() { - MEMORYSTATUSEX status; - status.dwLength = sizeof(status); - if (::GlobalMemoryStatusEx(&status)) - return static_cast<int>(status.ullTotalPhys / kBytesPerMegabyte); - - NOTREACHED() << "GlobalMemoryStatusEx failed."; - return 0; -} - std::string GetCPUArchitecture() { // TODO: Make this vary when we support any other architectures. return "x86"; diff --git a/chrome/common/env_util.h b/chrome/common/env_util.h index 27d82f7..bb37935 100644 --- a/chrome/common/env_util.h +++ b/chrome/common/env_util.h @@ -24,9 +24,6 @@ std::string GetOperatingSystemName(); // Returns the version of the host operating system. std::string GetOperatingSystemVersion(); -// Returns the total amount of physical memory present. -int GetPhysicalMemoryMB(); - // Returns the CPU architecture of the system. std::string GetCPUArchitecture(); |