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. <[email protected]>

http://codereview.chromium.org/4079


git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2697 0039d316-1c4b-4281-b951-d872f2087c98
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 @@
   // 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