Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Unified Diff: webkit/glue/webkit_glue.cc

Issue 27088: Additional fix for Sandboxed WebKit on OS X. (Closed)
Patch Set: Fixes Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« base/sys_info.h ('K') | « base/sys_info_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webkit_glue.cc
diff --git a/webkit/glue/webkit_glue.cc b/webkit/glue/webkit_glue.cc
index c98c987df5ef9d74bd8a12602c2b8104d171dee0..cd099b3e99042d7a110fecb28e4aa58a94e7bee8 100644
--- a/webkit/glue/webkit_glue.cc
+++ b/webkit/glue/webkit_glue.cc
@@ -37,6 +37,7 @@ 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"
@@ -336,20 +337,9 @@ void BuildUserAgent(bool mimic_safari, std::string* result) {
int32 os_major_version = 0;
int32 os_minor_version = 0;
int32 os_bugfix_version = 0;
-#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
+ base::SysInfo::OperatingSystemVersionNumbers(&os_major_version,
+ &os_minor_version,
+ &os_bugfix_version);
// 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
« base/sys_info.h ('K') | « base/sys_info_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698