diff options
author | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-24 11:19:08 +0000 |
---|---|---|
committer | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-24 11:19:08 +0000 |
commit | 77816eaab9dd14137c7e62a4f5ed9f05103ebb31 (patch) | |
tree | 0b23cb710252fa8ef7c838c358c453100cb823c0 /base/file_version_info_mac.mm | |
parent | 7abf72d755470f04e1e225a5bd518b770a61981a (diff) | |
download | chromium_src-77816eaab9dd14137c7e62a4f5ed9f05103ebb31.zip chromium_src-77816eaab9dd14137c7e62a4f5ed9f05103ebb31.tar.gz chromium_src-77816eaab9dd14137c7e62a4f5ed9f05103ebb31.tar.bz2 |
Use CFBundleVersion for product_version on iOS
On OS X, CFBundleVersion is used by LaunchServices, and must follow
specific formatting rules, so the four-part Chrome version is in
CFBundleShortVersionString. On iOS, however, CFBundleVersion can be the
full version, but CFBundleShortVersionString has a policy-enfoced limit
of three version components.
BUG=None
TEST=None
Review URL: https://chromiumcodereview.appspot.com/10809059
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148081 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_version_info_mac.mm')
-rw-r--r-- | base/file_version_info_mac.mm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/base/file_version_info_mac.mm b/base/file_version_info_mac.mm index 93191e0c..09ae95b 100644 --- a/base/file_version_info_mac.mm +++ b/base/file_version_info_mac.mm @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -60,7 +60,16 @@ string16 FileVersionInfoMac::legal_copyright() { } string16 FileVersionInfoMac::product_version() { + // On OS X, CFBundleVersion is used by LaunchServices, and must follow + // specific formatting rules, so the four-part Chrome version is in + // CFBundleShortVersionString. On iOS, however, CFBundleVersion can be the + // full version, but CFBundleShortVersionString has a policy-enfoced limit + // of three version components. +#if defined(OS_IOS) + return GetString16Value(CFSTR("CFBundleVersion")); +#else return GetString16Value(CFSTR("CFBundleShortVersionString")); +#endif // defined(OS_IOS) } string16 FileVersionInfoMac::file_description() { |