| Index: chrome/browser/shell_integration_mac.mm
|
| diff --git a/chrome/browser/shell_integration_mac.mm b/chrome/browser/shell_integration_mac.mm
|
| index be2f6af2f913523e23eba03f7507fdaf0cacd9b3..5b17e9f0d35dae8b495aedbe2435f768c369ded0 100644
|
| --- a/chrome/browser/shell_integration_mac.mm
|
| +++ b/chrome/browser/shell_integration_mac.mm
|
| @@ -22,9 +22,9 @@ bool ShellIntegration::SetAsDefaultBrowser() {
|
| if (!CanSetAsDefaultBrowser())
|
| return false;
|
|
|
| - // We really do want the main bundle here, not base::mac::FrameworkBundle(),
|
| - // which is the bundle for the framework.
|
| - NSString* identifier = [[NSBundle mainBundle] bundleIdentifier];
|
| + // We really do want the outer bundle here, not the main bundle since setting
|
| + // a shortcut to Chrome as the default browser doesn't make sense.
|
| + NSString* identifier = [base::mac::OuterBundle() bundleIdentifier];
|
| if (!identifier)
|
| return false;
|
|
|
| @@ -42,9 +42,9 @@ bool ShellIntegration::SetAsDefaultProtocolClient(const std::string& protocol) {
|
| if (!CanSetAsDefaultProtocolClient())
|
| return false;
|
|
|
| - // We really do want the main bundle here, not base::mac::FrameworkBundle(),
|
| - // which is the bundle for the framework.
|
| - NSString* identifier = [[NSBundle mainBundle] bundleIdentifier];
|
| + // We really do want the main bundle here since it makes sense to set an
|
| + // app shortcut as a default protocol handler.
|
| + NSString* identifier = [base::mac::MainBundle() bundleIdentifier];
|
| if (!identifier)
|
| return false;
|
|
|
| @@ -96,9 +96,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::FrameworkBundle(),
|
| - // which is the bundle for the framework.
|
| - NSString* my_identifier = [[NSBundle mainBundle] bundleIdentifier];
|
| + // We really do want the outer bundle here, since this we want to know the
|
| + // status of the main Chrome bundle and not a shortcut.
|
| + NSString* my_identifier = [base::mac::OuterBundle() bundleIdentifier];
|
| if (!my_identifier)
|
| return UNKNOWN_DEFAULT_WEB_CLIENT;
|
|
|
| @@ -118,9 +118,9 @@ ShellIntegration::DefaultWebClientState
|
| if (protocol.empty())
|
| return UNKNOWN_DEFAULT_WEB_CLIENT;
|
|
|
| - // We really do want the main bundle here, not base::mac::FrameworkBundle(),
|
| - // which is the bundle for the framework.
|
| - NSString* my_identifier = [[NSBundle mainBundle] bundleIdentifier];
|
| + // We really do want the main bundle here since it makes sense to set an
|
| + // app shortcut as a default protocol handler.
|
| + NSString* my_identifier = [base::mac::MainBundle() bundleIdentifier];
|
| if (!my_identifier)
|
| return UNKNOWN_DEFAULT_WEB_CLIENT;
|
|
|
|
|