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

Unified Diff: chrome/common/mac/app_mode_chrome_locator.mm

Issue 1016543004: [Mac] Use the app's version as the app shim bundle version. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use GetVersionForDisplay. Created 5 years, 9 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 | « chrome/browser/web_applications/web_app_mac_unittest.mm ('k') | chrome/common/mac/app_mode_common.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/mac/app_mode_chrome_locator.mm
diff --git a/chrome/common/mac/app_mode_chrome_locator.mm b/chrome/common/mac/app_mode_chrome_locator.mm
index 923e671d804e356e6e42cfd1a17cd96ff6e8081d..efd272e706ba56b748e4b76b96d76cbd03aa07ac 100644
--- a/chrome/common/mac/app_mode_chrome_locator.mm
+++ b/chrome/common/mac/app_mode_chrome_locator.mm
@@ -12,6 +12,7 @@
#include "base/mac/foundation_util.h"
#include "base/strings/sys_string_conversions.h"
#include "chrome/common/chrome_constants.h"
+#include "chrome/common/mac/app_mode_common.h"
namespace app_mode {
@@ -54,7 +55,12 @@ bool GetChromeBundleInfo(const base::FilePath& chrome_bundle,
!base::PathExists(base::mac::NSStringToFilePath(cr_versioned_path))) {
// Read version string.
NSString* cr_version = ObjCCast<NSString>(
- [cr_bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"]);
+ [cr_bundle objectForInfoDictionaryKey:app_mode::kCrBundleVersionKey]);
+ if (!cr_version) {
+ // Older bundles have the Chrome version in the following key.
+ cr_version = ObjCCast<NSString>([cr_bundle
+ objectForInfoDictionaryKey:app_mode::kCFBundleShortVersionStringKey]);
+ }
if (!cr_version)
return false;
« no previous file with comments | « chrome/browser/web_applications/web_app_mac_unittest.mm ('k') | chrome/common/mac/app_mode_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698