Chromium Code Reviews| 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; |