From a302ff0affd0d8a63acf872e740cd4e35ca379de Mon Sep 17 00:00:00 2001 From: "jeremy@chromium.org" Date: Wed, 25 Jan 2012 07:59:08 +0000 Subject: Transition to base/mac/bundle_locations.h step 3 Convert some instances of [NSBundle mainBundle] to equivalent calls in base/mac/bundle_locations.h BUG=None TEST=Code should compile and all unit tests should pass. Review URL: http://codereview.chromium.org/9240004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119030 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/mac/keystone_glue.mm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'chrome/browser/mac/keystone_glue.mm') diff --git a/chrome/browser/mac/keystone_glue.mm b/chrome/browser/mac/keystone_glue.mm index 40a8d00..c0c1cd3 100644 --- a/chrome/browser/mac/keystone_glue.mm +++ b/chrome/browser/mac/keystone_glue.mm @@ -14,7 +14,6 @@ #include "base/location.h" #include "base/logging.h" #include "base/mac/bundle_locations.h" -#include "base/mac/foundation_util.h" #include "base/mac/mac_util.h" #include "base/mac/scoped_nsautorelease_pool.h" #include "base/mac/scoped_nsexception_enabler.h" @@ -262,16 +261,16 @@ NSString* const kVersionKey = @"KSVersion"; } - (NSDictionary*)infoDictionary { - // Use [NSBundle mainBundle] to get the application's own bundle identifier + // Use base::mac::OuterBundle() to get the Chrome app'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]; + return [base::mac::OuterBundle() infoDictionary]; } - (void)loadParameters { - NSBundle* appBundle = [NSBundle mainBundle]; + NSBundle* appBundle = base::mac::OuterBundle(); NSDictionary* infoDictionary = [self infoDictionary]; NSString* productID = [infoDictionary objectForKey:@"KSProductID"]; @@ -746,7 +745,7 @@ NSString* const kVersionKey = @"KSVersion"; // authenticating, may actually result in different ownership being applied // to files and directories. NSFileManager* fileManager = [NSFileManager defaultManager]; - NSString* executablePath = [[NSBundle mainBundle] executablePath]; + NSString* executablePath = [base::mac::OuterBundle() executablePath]; NSString* frameworkPath = [base::mac::FrameworkBundle() bundlePath]; return ![fileManager isWritableFileAtPath:appPath_] || ![fileManager isWritableFileAtPath:executablePath] || -- cgit v1.1