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

Unified Diff: printing/pdf_metafile_cg_mac.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 | « media/audio/mac/audio_manager_mac.cc ('k') | third_party/apple_apsl/CFBase.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/pdf_metafile_cg_mac.cc
===================================================================
--- printing/pdf_metafile_cg_mac.cc (revision 88826)
+++ printing/pdf_metafile_cg_mac.cc (working copy)
@@ -6,8 +6,8 @@
#include "base/file_path.h"
#include "base/logging.h"
+#include "base/mac/mac_util.h"
#include "base/mac/scoped_cftyperef.h"
-#include "base/sys_info.h"
#include "base/sys_string_conversions.h"
#include "base/threading/thread_local.h"
#include "ui/gfx/rect.h"
@@ -36,17 +36,6 @@
base::ThreadLocalPointer<struct __CFSet> thread_pdf_docs;
-bool PDFBugFixed() {
- int32 major_version;
- int32 minor_version;
- int32 bugfix_version;
- base::SysInfo::OperatingSystemVersionNumbers(&major_version,
- &minor_version,
- &bugfix_version);
- return
- major_version > 10 || (major_version == 10 && minor_version >= 7);
-}
-
} // namespace
namespace printing {
@@ -54,8 +43,7 @@
PdfMetafileCg::PdfMetafileCg()
: page_is_open_(false),
thread_pdf_docs_owned_(false) {
- static bool bug_fixed = PDFBugFixed();
- if (!thread_pdf_docs.Get() && !bug_fixed) {
+ if (!thread_pdf_docs.Get() && base::mac::IsOSSnowLeopardOrEarlier()) {
thread_pdf_docs_owned_ = true;
thread_pdf_docs.Set(CFSetCreateMutable(kCFAllocatorDefault,
0,
« no previous file with comments | « media/audio/mac/audio_manager_mac.cc ('k') | third_party/apple_apsl/CFBase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698