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

Unified Diff: base/file_version_info_mac.mm

Issue 542223002: Use a different plist key for iOS versioning (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_version_info_mac.mm
diff --git a/base/file_version_info_mac.mm b/base/file_version_info_mac.mm
index 3b5a8ba9bf83a6f2137beaf16b4b737db4a097e4..8542b19844114c28b02e47e4d86e93ca9b8a32aa 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")));
rohitrao (ping after 24h) 2014/09/05 17:01:50 We can use whatever key we want without worrying a
stuartmorgan 2014/09/05 17:15:09 I can't imagine Apple would start using Cr as a pr
+ if (version.length() > 0)
+ return version;
return GetString16Value(CFSTR("CFBundleVersion"));
rohitrao (ping after 24h) 2014/09/05 17:01:50 Do you intend to remove the fallback code eventual
stuartmorgan 2014/09/05 17:15:09 Since this is in base/ I wasn't planning on it. Th
stuartmorgan 2014/09/05 17:24:54 Also, the fallback should make life easier for tes
#else
return GetString16Value(CFSTR("CFBundleShortVersionString"));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698