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

Unified Diff: chrome/browser/mac/keystone_glue.mm

Issue 9240004: Transition to base/mac/bundle_locations.h step 3 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 8 years, 11 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/mac/install_from_dmg.mm ('k') | chrome/browser/shell_integration_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/mac/keystone_glue.mm
diff --git a/chrome/browser/mac/keystone_glue.mm b/chrome/browser/mac/keystone_glue.mm
index 40a8d0044ec5c0de6d5ae1634af73d0d72b47d81..c0c1cd30580408739779fd0ccc04dc4ded089780 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] ||
« no previous file with comments | « chrome/browser/mac/install_from_dmg.mm ('k') | chrome/browser/shell_integration_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698