| 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 3cd5302cc46cf9b1b8679c84026230719484aa94..7fffebaac7d1c8e3a4c087a9eb1df0204d55c95d 100644
|
| --- a/chrome/common/mac/app_mode_chrome_locator.mm
|
| +++ b/chrome/common/mac/app_mode_chrome_locator.mm
|
| @@ -25,8 +25,8 @@ bool FindBundleById(NSString* bundle_id, base::FilePath* out_bundle) {
|
| }
|
|
|
| bool GetChromeBundleInfo(const base::FilePath& chrome_bundle,
|
| + const std::string& version_str,
|
| base::FilePath* executable_path,
|
| - base::string16* raw_version_str,
|
| base::FilePath* version_path,
|
| base::FilePath* framework_shlib_path) {
|
| using base::mac::ObjCCast;
|
| @@ -37,12 +37,16 @@ bool GetChromeBundleInfo(const base::FilePath& chrome_bundle,
|
| if (!cr_bundle)
|
| return false;
|
|
|
| - // Read raw version string.
|
| - NSString* cr_version =
|
| - ObjCCast<NSString>(
|
| - [cr_bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"]);
|
| - if (!cr_version)
|
| - return false;
|
| + // Read version string.
|
| + NSString* cr_version;
|
| + if (version_str.empty()) {
|
| + cr_version = ObjCCast<NSString>(
|
| + [cr_bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"]);
|
| + if (!cr_version)
|
| + return false;
|
| + } else {
|
| + cr_version = base::SysUTF8ToNSString(version_str);
|
| + }
|
|
|
| // Get versioned directory.
|
| NSArray* cr_versioned_path_components =
|
| @@ -90,7 +94,6 @@ bool GetChromeBundleInfo(const base::FilePath& chrome_bundle,
|
|
|
| // Everything OK, copy output parameters.
|
| *executable_path = base::mac::NSStringToFilePath([cr_bundle executablePath]);
|
| - *raw_version_str = base::SysNSStringToUTF16(cr_version);
|
| *version_path = base::mac::NSStringToFilePath(cr_versioned_path);
|
| *framework_shlib_path =
|
| base::mac::NSStringToFilePath(cr_framework_shlib_path);
|
|
|