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

Unified Diff: webkit/plugins/npapi/plugin_host.cc

Issue 7144007: Improve and unify Mac OS X run-time version checks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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
« no previous file with comments | « ui/base/resource/resource_bundle_mac.mm ('k') | webkit/plugins/npapi/webplugin_delegate_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/npapi/plugin_host.cc
===================================================================
--- webkit/plugins/npapi/plugin_host.cc (revision 88826)
+++ webkit/plugins/npapi/plugin_host.cc (working copy)
@@ -30,7 +30,7 @@
#include "webkit/plugins/npapi/webplugininfo.h"
#if defined(OS_MACOSX)
-#include "base/sys_info.h"
+#include "base/mac/mac_util.h"
#endif
using WebKit::WebBindings;
@@ -58,10 +58,7 @@
// Returns true if the OS supports shared accelerated surfaces via IOSurface.
// This is true on Snow Leopard and higher.
static bool SupportsSharingAcceleratedSurfaces() {
- int32 major, minor, bugfix;
- base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
- bool isSnowLeopardOrLater = major > 10 || (major == 10 && minor > 5);
- if (!isSnowLeopardOrLater)
+ if (base::mac::IsOSLeopardOrEarlier())
return false;
// We also need to be running with desktop GL and not the software
// OSMesa renderer in order to share accelerated surfaces between
@@ -871,9 +868,7 @@
// We support the clarifications to the Cocoa IME event spec, but since
// IME currently only works on 10.6, only answer true there.
NPBool* supports_update = reinterpret_cast<NPBool*>(value);
- int32 major, minor, bugfix;
- base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
- *supports_update = major > 10 || (major == 10 && minor > 5);
+ *supports_update = base::mac::IsOSSnowLeopardOrLater();
rv = NPERR_NO_ERROR;
break;
}
« no previous file with comments | « ui/base/resource/resource_bundle_mac.mm ('k') | webkit/plugins/npapi/webplugin_delegate_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698