summaryrefslogtreecommitdiffstats
path: root/base/sys_info_win.cc
diff options
context:
space:
mode:
authorjeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-24 15:40:38 +0000
committerjeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-24 15:40:38 +0000
commit4cc015107e2fcc166da1d9d0debfa3e48f30192c (patch)
tree92866130e7dec74b6b4ed60b143f864ad52147c0 /base/sys_info_win.cc
parent3e9f7fc1bbd90e6e439180e9cedcc48dc7ac9924 (diff)
downloadchromium_src-4cc015107e2fcc166da1d9d0debfa3e48f30192c.zip
chromium_src-4cc015107e2fcc166da1d9d0debfa3e48f30192c.tar.gz
chromium_src-4cc015107e2fcc166da1d9d0debfa3e48f30192c.tar.bz2
Fix for Sandboxed WebKit on OS X:
* Cache Gestalt's value since it opens files. * Do a little cleanup in sys_info while I'm there and add a unit test. * Label some methods as not being threadsafe on OSX/POSIX. Review URL: http://codereview.chromium.org/27088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10259 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/sys_info_win.cc')
-rw-r--r--base/sys_info_win.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/base/sys_info_win.cc b/base/sys_info_win.cc
index a195204..1c10156 100644
--- a/base/sys_info_win.cc
+++ b/base/sys_info_win.cc
@@ -108,4 +108,16 @@ size_t SysInfo::VMAllocationGranularity() {
return sysinfo.dwAllocationGranularity;
}
+// static
+void OperatingSystemVersionNumbers(int32 *major_version,
+ int32 *minor_version,
+ int32 *bugfix_version) {
+ OSVERSIONINFO info = {0};
+ info.dwOSVersionInfoSize = sizeof(info);
+ GetVersionEx(&info);
+ *major_version = info.dwMajorVersion;
+ *minor_version = info.dwMinorVersion;
+ *bugfix_version = 0;
+}
+
} // namespace base