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

Issue 7144007: Improve and unify Mac OS X run-time version checks (Closed)

Created:
9 years, 6 months ago by Mark Mentovai
Modified:
9 years, 6 months ago
CC:
chromium-reviews, hclam+watch_chromium.org, sjl, ddorwin+watch_chromium.org, fischman+watch_chromium.org, brettw-cc_chromium.org, jam, joi+watch-content_chromium.org, acolwell GONE FROM CHROMIUM, annacc, darin-cc_chromium.org, ajwong+watch_chromium.org, vrk (LEFT CHROMIUM), Paweł Hajdan Jr.
Visibility:
Public.

Description

Improve and unify Mac OS X run-time version checks. Don't use base::SysInfo::OperatingSystemVersionNumbers, because it calls Gestalt, which has a few bad properties. Introduce new functions that perform specific version checks. BUG=85972 TEST=base_unittests MacUtilTest.IsOSEllipsis Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=89028

Patch Set 1 #

Total comments: 5

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Total comments: 4

Patch Set 6 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+288 lines, -175 lines) Patch
M base/mac/mac_util.h View 1 2 3 2 chunks +49 lines, -0 lines 0 comments Download
M base/mac/mac_util.mm View 1 2 3 2 chunks +126 lines, -0 lines 0 comments Download
M base/mac/mac_util_unittest.mm View 2 chunks +43 lines, -0 lines 0 comments Download
M base/process_util_mac.mm View 1 2 3 7 chunks +18 lines, -35 lines 0 comments Download
M base/sys_info.h View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/bug_report_util.cc View 1 chunk +1 line, -5 lines 0 comments Download
M chrome/browser/process_info_snapshot_mac.cc View 2 chunks +3 lines, -5 lines 0 comments Download
M chrome/browser/ui/cocoa/objc_zombie.mm View 3 chunks +6 lines, -10 lines 0 comments Download
M chrome/browser/ui/cocoa/wrench_menu/menu_tracked_button.mm View 1 2 3 4 2 chunks +3 lines, -9 lines 0 comments Download
M content/browser/renderer_host/backing_store_mac.mm View 1 2 3 3 chunks +3 lines, -16 lines 0 comments Download
M content/common/sandbox_mac.mm View 3 chunks +5 lines, -18 lines 0 comments Download
M content/renderer/renderer_main.cc View 1 2 3 3 chunks +5 lines, -12 lines 0 comments Download
M content/renderer/webplugin_delegate_proxy.cc View 4 chunks +5 lines, -9 lines 0 comments Download
M media/audio/mac/audio_manager_mac.cc View 2 chunks +2 lines, -4 lines 0 comments Download
M printing/pdf_metafile_cg_mac.cc View 1 2 3 3 chunks +2 lines, -14 lines 0 comments Download
M third_party/apple_apsl/CFBase.h View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/apple_apsl/README.chromium View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M ui/base/resource/resource_bundle_mac.mm View 1 2 3 4 5 2 chunks +2 lines, -8 lines 0 comments Download
M webkit/plugins/npapi/plugin_host.cc View 1 2 3 3 chunks +3 lines, -8 lines 0 comments Download
M webkit/plugins/npapi/webplugin_delegate_impl.h View 1 2 3 1 chunk +0 lines, -3 lines 0 comments Download
M webkit/plugins/npapi/webplugin_delegate_impl_mac.mm View 1 2 3 3 chunks +3 lines, -15 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
Mark Mentovai
9 years, 6 months ago (2011-06-13 22:39:01 UTC) #1
scherkus (not reviewing)
LGTM on media
9 years, 6 months ago (2011-06-13 22:40:37 UTC) #2
Avi (use Gerrit)
LGTM http://codereview.chromium.org/7144007/diff/1/base/mac/mac_util.mm File base/mac/mac_util.mm (right): http://codereview.chromium.org/7144007/diff/1/base/mac/mac_util.mm#newcode17 base/mac/mac_util.mm:17: #include "base/string_number_conversions.h" alphabetize http://codereview.chromium.org/7144007/diff/1/chrome/browser/bug_report_util.cc File chrome/browser/bug_report_util.cc (right): http://codereview.chromium.org/7144007/diff/1/chrome/browser/bug_report_util.cc#newcode170 ...
9 years, 6 months ago (2011-06-13 22:45:22 UTC) #3
Mark Mentovai
http://codereview.chromium.org/7144007/diff/1/base/mac/mac_util.mm File base/mac/mac_util.mm (right): http://codereview.chromium.org/7144007/diff/1/base/mac/mac_util.mm#newcode17 base/mac/mac_util.mm:17: #include "base/string_number_conversions.h" Avi wrote: > alphabetize OOPS! http://codereview.chromium.org/7144007/diff/1/chrome/browser/bug_report_util.cc File ...
9 years, 6 months ago (2011-06-14 00:18:25 UTC) #4
Avi (use Gerrit)
http://codereview.chromium.org/7144007/diff/1/chrome/browser/bug_report_util.cc File chrome/browser/bug_report_util.cc (right): http://codereview.chromium.org/7144007/diff/1/chrome/browser/bug_report_util.cc#newcode170 chrome/browser/bug_report_util.cc:170: *os_version = base::SysInfo::OperatingSystemVersion(); Misread. My bad.
9 years, 6 months ago (2011-06-14 01:40:22 UTC) #5
Mark Mentovai
jam for OWNERS approval too
9 years, 6 months ago (2011-06-14 02:59:41 UTC) #6
jam
content lgtm
9 years, 6 months ago (2011-06-14 06:29:17 UTC) #7
Mark Mentovai
Avi, one more look? I added some minor clean-ups, added an optimization for when the ...
9 years, 6 months ago (2011-06-14 17:00:45 UTC) #8
Avi (use Gerrit)
SLGTM with comments. http://codereview.chromium.org/7144007/diff/1025/base/sys_info.h File base/sys_info.h (right): http://codereview.chromium.org/7144007/diff/1025/base/sys_info.h#newcode48 base/sys_info.h:48: // base/win/windows_version.h. Is there any use ...
9 years, 6 months ago (2011-06-14 17:50:17 UTC) #9
Mark Mentovai
9 years, 6 months ago (2011-06-14 18:00:18 UTC) #10
http://codereview.chromium.org/7144007/diff/1025/base/sys_info.h
File base/sys_info.h (right):

http://codereview.chromium.org/7144007/diff/1025/base/sys_info.h#newcode48
base/sys_info.h:48: // base/win/windows_version.h.
Avi wrote:
> Is there any use left for this function, then?

Yes, there are still two or three mofos left that use it to format the version
number themselves. For example, the user agent string on Mac is formatted as
10_6_7.

I have a separate change (http://codereview.chromium.org/7150018) to transition
the Windows callers that were using this instead of the API I recommended. (On
Windows, OperatingSystemVersionNumbers is actually implemented on
base::win::OSInfo.)

http://codereview.chromium.org/7144007/diff/1025/ui/base/resource/resource_bu...
File ui/base/resource/resource_bundle_mac.mm (right):

http://codereview.chromium.org/7144007/diff/1025/ui/base/resource/resource_bu...
ui/base/resource/resource_bundle_mac.mm:50: // Only load the large resource pak
on if we're running on 10.7 or above.
Avi wrote:
> drop "on": "... pak if we're running ..."

Good catch.

Powered by Google App Engine
This is Rietveld 408576698