diff options
author | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-24 16:14:37 +0000 |
---|---|---|
committer | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-24 16:14:37 +0000 |
commit | 611cc2f8f49fa5468cf3dc2f56052f5d95196a01 (patch) | |
tree | 5ed57a62e1e3d032f63b46515a74ec78b05ada78 /webkit | |
parent | 8af455ad2a4bc2bfed9fbe3561697b42f6acf9c9 (diff) | |
download | chromium_src-611cc2f8f49fa5468cf3dc2f56052f5d95196a01.zip chromium_src-611cc2f8f49fa5468cf3dc2f56052f5d95196a01.tar.gz chromium_src-611cc2f8f49fa5468cf3dc2f56052f5d95196a01.tar.bz2 |
Revert r10259 & subsequent fixes.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10262 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/webkit_glue.cc | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/webkit/glue/webkit_glue.cc b/webkit/glue/webkit_glue.cc index cd099b3..c98c987 100644 --- a/webkit/glue/webkit_glue.cc +++ b/webkit/glue/webkit_glue.cc @@ -37,7 +37,6 @@ MSVC_POP_WARNING(); #include "base/file_version_info.h" #include "base/singleton.h" #include "base/string_util.h" -#include "base/sys_info.h" #include "skia/include/SkBitmap.h" #include "webkit/glue/event_conversion.h" #include "webkit/glue/glue_util.h" @@ -337,9 +336,20 @@ void BuildUserAgent(bool mimic_safari, std::string* result) { int32 os_major_version = 0; int32 os_minor_version = 0; int32 os_bugfix_version = 0; - base::SysInfo::OperatingSystemVersionNumbers(&os_major_version, - &os_minor_version, - &os_bugfix_version); +#if defined(OS_WIN) + OSVERSIONINFO info = {0}; + info.dwOSVersionInfoSize = sizeof(info); + GetVersionEx(&info); + os_major_version = info.dwMajorVersion; + os_minor_version = info.dwMinorVersion; +#elif defined(OS_MACOSX) + Gestalt(gestaltSystemVersionMajor, + reinterpret_cast<SInt32*>(&os_major_version)); + Gestalt(gestaltSystemVersionMinor, + reinterpret_cast<SInt32*>(&os_minor_version)); + Gestalt(gestaltSystemVersionBugFix, + reinterpret_cast<SInt32*>(&os_bugfix_version)); +#endif // Get the product name and version, and replace Safari's Version/X string // with it. This is done to expose our product name in a manner that is |