summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorstuartmorgan <stuartmorgan@chromium.org>2014-09-08 15:51:24 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-08 22:54:11 +0000
commit5e617acfcbe4287342fbd7351039b443fec9d6ee (patch)
treef70e2bd1fc2e6da320543c946ea02d4a8178525a /base
parent2cbe08dab14cb1f72f3ec478d52941d0bca2fa55 (diff)
downloadchromium_src-5e617acfcbe4287342fbd7351039b443fec9d6ee.zip
chromium_src-5e617acfcbe4287342fbd7351039b443fec9d6ee.tar.gz
chromium_src-5e617acfcbe4287342fbd7351039b443fec9d6ee.tar.bz2
Use a different plist key for iOS versioning
App Store rules appear to be moving toward enforcing the format of CFBundleVerison on iOS, so this allows setting a custom plist key to store the full Chrome version instead. BUG=411302 Review URL: https://codereview.chromium.org/542223002 Cr-Commit-Position: refs/heads/master@{#293802}
Diffstat (limited to 'base')
-rw-r--r--base/file_version_info_mac.mm9
1 files changed, 6 insertions, 3 deletions
diff --git a/base/file_version_info_mac.mm b/base/file_version_info_mac.mm
index 3b5a8ba..8542b19 100644
--- a/base/file_version_info_mac.mm
+++ b/base/file_version_info_mac.mm
@@ -62,10 +62,13 @@ base::string16 FileVersionInfoMac::legal_copyright() {
base::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.
+ // CFBundleShortVersionString. On iOS, both have a policy-enfoced limit
+ // of three version components, so the full version is stored in a custom
+ // key (CrBundleVersion) falling back to CFBundleVersion if not present.
#if defined(OS_IOS)
+ base::string16 version(GetString16Value(CFSTR("CrBundleVersion")));
+ if (version.length() > 0)
+ return version;
return GetString16Value(CFSTR("CFBundleVersion"));
#else
return GetString16Value(CFSTR("CFBundleShortVersionString"));