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

Unified Diff: content/renderer/webplugin_delegate_proxy.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 | « content/renderer/renderer_main.cc ('k') | media/audio/mac/audio_manager_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/webplugin_delegate_proxy.cc
===================================================================
--- content/renderer/webplugin_delegate_proxy.cc (revision 88826)
+++ content/renderer/webplugin_delegate_proxy.cc (working copy)
@@ -18,7 +18,6 @@
#include "base/memory/scoped_ptr.h"
#include "base/string_split.h"
#include "base/string_util.h"
-#include "base/sys_info.h"
#include "base/utf_string_conversions.h"
#include "base/version.h"
#include "content/common/child_process.h"
@@ -54,6 +53,10 @@
#include "ipc/ipc_channel_posix.h"
#endif
+#if defined(OS_MACOSX)
+#include "base/mac/mac_util.h"
+#endif
+
using WebKit::WebBindings;
using WebKit::WebCursorInfo;
using WebKit::WebDragData;
@@ -272,13 +275,6 @@
}
#if defined(OS_MACOSX)
-// Returns true if the OS is 10.5 (Leopard).
-static bool OSIsLeopard() {
- int32 major, minor, bugfix;
- base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
- return major == 10 && minor == 5;
-}
-
// Returns true if the given Flash version assumes QuickDraw support is present
// instead of checking using the negotiation system.
static bool FlashVersionAssumesQuickDrawSupport(const string16& version) {
@@ -365,7 +361,7 @@
// (where Flash doesn't use CA) to prevent QuickDraw from being used.
// TODO(stuartmorgan): Remove this code once the two latest major Flash
// releases negotiate correctly.
- if (flash && !transparent_ && OSIsLeopard() &&
+ if (flash && !transparent_ && base::mac::IsOSLeopardOrEarlier() &&
FlashVersionAssumesQuickDrawSupport(info_.version)) {
params.arg_names.push_back("wmode");
params.arg_values.push_back("opaque");
« no previous file with comments | « content/renderer/renderer_main.cc ('k') | media/audio/mac/audio_manager_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698