Index: chrome/browser/shell_integration_mac.mm |
diff --git a/chrome/browser/shell_integration_mac.mm b/chrome/browser/shell_integration_mac.mm |
index 8a52d7b86ca80b92daa4fea793e42f65620c5a73..932630eb9902c6cef77c41c6e7a6092bd2d8a4c7 100644 |
--- a/chrome/browser/shell_integration_mac.mm |
+++ b/chrome/browser/shell_integration_mac.mm |
@@ -10,16 +10,21 @@ |
#include "chrome/common/chrome_version_info.h" |
#import "third_party/mozilla/NSWorkspace+Utils.h" |
-bool ShellIntegration::CanSetAsDefaultBrowser() { |
- return chrome::VersionInfo::GetChannel() != |
- chrome::VersionInfo::CHANNEL_CANARY; |
+ShellIntegration::DefaultSettingsChangePermission |
+ ShellIntegration::CanSetAsDefaultBrowser() { |
+ if (chrome::VersionInfo::GetChannel() != |
+ chrome::VersionInfo::CHANNEL_CANARY) { |
+ return CHANGE_DEFAULT_UNATTENDED; |
+ } |
+ |
+ return CHANGE_DEFAULT_NOT_ALLOWED; |
} |
// Sets Chromium as default browser to be used by the operating system. This |
// applies only for the current user. Returns false if this cannot be done, or |
// if the operation fails. |
bool ShellIntegration::SetAsDefaultBrowser() { |
- if (!CanSetAsDefaultBrowser()) |
+ if (CanSetAsDefaultBrowser() != CHANGE_DEFAULT_UNATTENDED) |
return false; |
// We really do want the outer bundle here, not the main bundle since setting |
@@ -39,7 +44,7 @@ bool ShellIntegration::SetAsDefaultProtocolClient(const std::string& protocol) { |
if (protocol.empty()) |
return false; |
- if (!CanSetAsDefaultProtocolClient()) |
+ if (CanSetAsDefaultBrowser() != CHANGE_DEFAULT_UNATTENDED) |
grt (UTC plus 2)
2012/06/01 14:36:39
CanSetAsDefaultBrowser -> CanSetAsDefaultProtocolC
motek.
2012/06/01 20:50:17
Done.
|
return false; |
// We really do want the main bundle here since it makes sense to set an |