Chromium Code Reviews| 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")); |