diff options
author | jeremya@chromium.org <jeremya@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-24 01:55:19 +0000 |
---|---|---|
committer | jeremya@chromium.org <jeremya@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-24 01:55:19 +0000 |
commit | 6efa6780abf8cd7bd7a9eb6938ec8d2db66b4b99 (patch) | |
tree | 4819b53dd9beebd7d926b99e3eeb654da53ea53b | |
parent | e9875de7440186a564a15f2399be0c32434b9c40 (diff) | |
download | chromium_src-6efa6780abf8cd7bd7a9eb6938ec8d2db66b4b99.zip chromium_src-6efa6780abf8cd7bd7a9eb6938ec8d2db66b4b99.tar.gz chromium_src-6efa6780abf8cd7bd7a9eb6938ec8d2db66b4b99.tar.bz2 |
[mac] Fix Chrome bundle locating in app mode for Canary.
This changes the way that the app mode loader builds the path to the Chrome
Framework. Previously it tried to load
"Google Chrome Canary.app/Contents/Versions/xx.x.xxxx.x/Google Chrome Canary Framework.framework/Google Chrome Canary Framework"
but in fact the framework is stored at
"Google Chrome Canary.app/Contents/Versions/xx.x.xxxx.x/Google Chrome Framework.framework/Google Chrome Framework"
This patch uses chrome::kFrameworkName to build the path to the framework.
BUG=170765
R=jeremy@chromium.org
Review URL: https://chromiumcodereview.appspot.com/12041002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178474 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/chrome.gyp | 1 | ||||
-rw-r--r-- | chrome/common/mac/app_mode_chrome_locator.mm | 12 |
2 files changed, 11 insertions, 2 deletions
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index a42e822..eb94a43 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -528,6 +528,7 @@ 'product_name': 'app_mode_app_support', 'dependencies': [ '../base/base.gyp:base', + 'common_constants.gyp:common_constants', ], 'sources': [ 'common/mac/app_mode_chrome_locator.h', diff --git a/chrome/common/mac/app_mode_chrome_locator.mm b/chrome/common/mac/app_mode_chrome_locator.mm index b64778f..6ca56a7 100644 --- a/chrome/common/mac/app_mode_chrome_locator.mm +++ b/chrome/common/mac/app_mode_chrome_locator.mm @@ -10,6 +10,7 @@ #include "base/file_path.h" #include "base/mac/foundation_util.h" #include "base/sys_string_conversions.h" +#include "chrome/common/chrome_constants.h" namespace app_mode { @@ -58,10 +59,17 @@ bool GetChromeBundleInfo(const FilePath& chrome_bundle, [cr_bundle objectForInfoDictionaryKey:@"CFBundleExecutable"]); NSString* cr_framework_shlib_path = [cr_versioned_path stringByAppendingPathComponent: - [cr_bundle_exe stringByAppendingString:@" Framework.framework"]]; + base::SysUTF8ToNSString(chrome::kFrameworkName)]; + // chrome::kFrameworkName looks like "$PRODUCT_STRING Framework.framework". + // The library itself is at + // "$PRODUCT_STRING Framework.framework/$PRODUCT_STRING Framework", so we cut + // off the .framework extension here and append it to the path. + // It's important to build the path to the framework this way because + // in Canary the framework is still called "Google Chrome Framework". cr_framework_shlib_path = [cr_framework_shlib_path stringByAppendingPathComponent: - [cr_bundle_exe stringByAppendingString:@" Framework"]]; + [base::SysUTF8ToNSString(chrome::kFrameworkName) + stringByDeletingPathExtension]]; if (!cr_bundle_exe || !cr_framework_shlib_path) return false; |