summaryrefslogtreecommitdiffstats
path: root/base/sys_info.h
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-29 22:18:01 +0000
committermark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-29 22:18:01 +0000
commit05f9b688e319fcb092be0e06f7b72d39dd3113b3 (patch)
tree6d24be7f9b788bbebbff6b2349e51dec49034ce6 /base/sys_info.h
parent86ec30d6710923cf1c193eb88b1e6251f831e0ef (diff)
downloadchromium_src-05f9b688e319fcb092be0e06f7b72d39dd3113b3.zip
chromium_src-05f9b688e319fcb092be0e06f7b72d39dd3113b3.tar.gz
chromium_src-05f9b688e319fcb092be0e06f7b72d39dd3113b3.tar.bz2
Refactoring for portability:
- Move chrome/common/env_util to base/sys_info - Move chrome/common/rand_util to base/rand_util (new), simplify its public interface, and fix its implementation Patch by Paweł Hajdan, Jr. <phajdan.jr@gmail.com> http://codereview.chromium.org/4079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2697 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/sys_info.h')
-rw-r--r--base/sys_info.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/base/sys_info.h b/base/sys_info.h
index 3d6a16a6..a70f5b6 100644
--- a/base/sys_info.h
+++ b/base/sys_info.h
@@ -28,6 +28,31 @@ class SysInfo {
// or -1 on failure.
static int64 AmountOfFreeDiskSpace(const std::wstring& path);
+ // Return true if the given environment variable is defined.
+ // TODO: find a better place for HasEnvVar.
+ static bool HasEnvVar(const wchar_t* var);
+
+ // Return the value of the given environment variable
+ // or an empty string if not defined.
+ // TODO: find a better place for GetEnvVar.
+ static std::wstring GetEnvVar(const wchar_t* var);
+
+ // Returns the name of the host operating system.
+ static std::string OperatingSystemName();
+
+ // Returns the version of the host operating system.
+ static std::string OperatingSystemVersion();
+
+ // Returns the CPU architecture of the system. Exact return value may differ
+ // across platforms.
+ static std::string CPUArchitecture();
+
+ // Returns the pixel dimensions of the primary display via the
+ // width and height parameters.
+ static void GetPrimaryDisplayDimensions(int* width, int* height);
+
+ // Return the number of displays.
+ static int DisplayCount();
};
} // namespace base