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

Unified Diff: chrome/browser/shell_integration_mac.mm

Issue 9240004: Transition to base/mac/bundle_locations.h step 3 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/keystone_glue.mm ('k') | chrome/browser/ui/cocoa/dock_icon.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/shell_integration_mac.mm
diff --git a/chrome/browser/shell_integration_mac.mm b/chrome/browser/shell_integration_mac.mm
index 8821595dc13613ac2feaf47c9e0245ac291acea0..1e874dbbe7bc1c948942d65252911dac54c4ab34 100644
--- a/chrome/browser/shell_integration_mac.mm
+++ b/chrome/browser/shell_integration_mac.mm
@@ -4,6 +4,7 @@
#include "chrome/browser/shell_integration.h"
+#include "base/mac/bundle_locations.h"
#include "base/mac/mac_util.h"
#include "base/mac/foundation_util.h"
#include "chrome/common/chrome_version_info.h"
@@ -21,9 +22,9 @@ bool ShellIntegration::SetAsDefaultBrowser() {
if (!CanSetAsDefaultBrowser())
return false;
- // We really do want the main bundle here, not base::mac::MainAppBundle(),
- // which is the bundle for the framework.
- NSString* identifier = [[NSBundle mainBundle] bundleIdentifier];
+ // We really do want the outer bundle here, which always corresponds to the
+ // Chrome bundle.
+ NSString* identifier = [base::mac::OuterBundle() bundleIdentifier];
if (!identifier)
return false;
@@ -41,9 +42,7 @@ bool ShellIntegration::SetAsDefaultProtocolClient(const std::string& protocol) {
if (!CanSetAsDefaultProtocolClient())
return false;
- // We really do want the main bundle here, not base::mac::MainAppBundle(),
- // which is the bundle for the framework.
- NSString* identifier = [[NSBundle mainBundle] bundleIdentifier];
+ NSString* identifier = [base::mac::MainBundle() bundleIdentifier];
Mark Mentovai 2012/01/17 16:49:07 Is it intentional that this file mixes OuterBundle
jeremy 2012/01/19 16:10:27 Yes this is intentional, do you think the usage is
Mark Mentovai 2012/01/19 16:48:54 jeremy wrote:
if (!identifier)
return false;
@@ -95,9 +94,9 @@ bool IsIdentifierDefaultProtocolClient(NSString* identifier,
// protocols; we don't want to report "no" here if the user has simply chosen
// to open HTML files in a text editor and FTP links with an FTP client.)
ShellIntegration::DefaultWebClientState ShellIntegration::IsDefaultBrowser() {
- // We really do want the main bundle here, not base::mac::MainAppBundle(),
- // which is the bundle for the framework.
- NSString* my_identifier = [[NSBundle mainBundle] bundleIdentifier];
+ // We really do want the outer bundle here, which always corresponds to the
+ // Chrome bundle.
+ NSString* my_identifier = [base::mac::OuterBundle() bundleIdentifier];
if (!my_identifier)
return UNKNOWN_DEFAULT_WEB_CLIENT;
« no previous file with comments | « chrome/browser/mac/keystone_glue.mm ('k') | chrome/browser/ui/cocoa/dock_icon.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698