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

Unified Diff: chrome/browser/shell_integration_mac.mm

Issue 261039: Use the real bundle identifier instead of the framework's identifier for dete... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/shell_integration_mac.mm
===================================================================
--- chrome/browser/shell_integration_mac.mm (revision 28536)
+++ chrome/browser/shell_integration_mac.mm (working copy)
@@ -10,8 +10,9 @@
// Sets Chromium as default browser (only for current user). Returns false if
// this operation fails (which we can't check for).
bool ShellIntegration::SetAsDefaultBrowser() {
- NSBundle* mainBundle = mac_util::MainAppBundle();
- NSString* identifier = [mainBundle bundleIdentifier];
+ // We really do want the main bundle here, not mac_util::MainAppBundle(),
+ // which is the bundle for the framework.
+ NSString* identifier = [[NSBundle mainBundle] bundleIdentifier];
[[NSWorkspace sharedWorkspace] setDefaultBrowserWithIdentifier:identifier];
return true;
}
@@ -38,8 +39,8 @@
// 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::DefaultBrowserState ShellIntegration::IsDefaultBrowser() {
- NSBundle* mainBundle = mac_util::MainAppBundle();
- NSString* myIdentifier = [mainBundle bundleIdentifier];
+ // As above, we want to use the real main bundle.
+ NSString* myIdentifier = [[NSBundle mainBundle] bundleIdentifier];
if (!myIdentifier)
return UNKNOWN_DEFAULT_BROWSER;
return IsIdentifierDefaultBrowser(myIdentifier) ? IS_DEFAULT_BROWSER
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698