diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-09 22:39:17 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-09 22:39:17 +0000 |
commit | 02a46a3c1f824675fe72f5fe6a7b95694452a1eb (patch) | |
tree | 279b1cff02e0915962dbe28a86a422c75ecebf27 /chrome/browser | |
parent | 1d075ecac5642dd52fa1fc8f07f08924dd9b6393 (diff) | |
download | chromium_src-02a46a3c1f824675fe72f5fe6a7b95694452a1eb.zip chromium_src-02a46a3c1f824675fe72f5fe6a7b95694452a1eb.tar.gz chromium_src-02a46a3c1f824675fe72f5fe6a7b95694452a1eb.tar.bz2 |
Take Keystone keys out of the framework's Info.plist. They now live only in
the outer application's Info.plist.
This ensures that the framework and other contents of the versioned directory
can be bit-for-bit identical for a given version, regardless of configured
Keystone channel. This will enable binary diff updates, because they will not
need knowledge of the channel a user is upgrading from.
BUG=45017
TEST=Keystone still functions properly, channel still shows up in the about
window and about:version of official builds
Review URL: http://codereview.chromium.org/2791001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49334 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/cocoa/keystone_glue.mm | 12 | ||||
-rw-r--r-- | chrome/browser/platform_util_mac.mm | 6 |
2 files changed, 9 insertions, 9 deletions
diff --git a/chrome/browser/cocoa/keystone_glue.mm b/chrome/browser/cocoa/keystone_glue.mm index cff6817..bcd78f4 100644 --- a/chrome/browser/cocoa/keystone_glue.mm +++ b/chrome/browser/cocoa/keystone_glue.mm @@ -247,19 +247,17 @@ const NSString* const kBrandKey = @"KSBrandID"; } - (NSDictionary*)infoDictionary { - // Use mac_util::MainAppBundle() to get the app framework's dictionary. - return [mac_util::MainAppBundle() infoDictionary]; -} - -- (void)loadParameters { - NSDictionary* infoDictionary = [self infoDictionary]; - // Use [NSBundle mainBundle] to get the application's own bundle identifier // and path, not the framework's. For auto-update, the application is // what's significant here: it's used to locate the outermost part of the // application for the existence checker and other operations that need to // see the entire application bundle. + return [[NSBundle mainBundle] infoDictionary]; +} + +- (void)loadParameters { NSBundle* appBundle = [NSBundle mainBundle]; + NSDictionary* infoDictionary = [self infoDictionary]; NSString* productID = [infoDictionary objectForKey:@"KSProductID"]; if (productID == nil) { diff --git a/chrome/browser/platform_util_mac.mm b/chrome/browser/platform_util_mac.mm index 79dca7c..d7a932b 100644 --- a/chrome/browser/platform_util_mac.mm +++ b/chrome/browser/platform_util_mac.mm @@ -73,14 +73,16 @@ void SimpleErrorBox(gfx::NativeWindow parent, string16 GetVersionStringModifier() { #if defined(GOOGLE_CHROME_BUILD) - NSBundle* bundle = mac_util::MainAppBundle(); + // Use the main application bundle and not the framework bundle. Keystone + // keys don't live in the framework. + NSBundle* bundle = [NSBundle mainBundle]; NSString* channel = [bundle objectForInfoDictionaryKey:@"KSChannelID"]; // Only ever return "", "unknown", "beta" or "dev" in a branded build. if (![bundle objectForInfoDictionaryKey:@"KSProductID"]) { // This build is not Keystone-enabled, it can't have a channel. channel = @"unknown"; - } else if (!channel || [channel isEqual:@"stable"]) { + } else if (!channel) { // For the stable channel, KSChannelID is not set. channel = @""; } else if ([channel isEqual:@"beta"] || [channel isEqual:@"dev"]) { |