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..e55e42b66add7147c114c4619837765afe24390a 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::DefaultWebClientSetPermission |
+ ShellIntegration::CanSetAsDefaultBrowser() { |
+ if (chrome::VersionInfo::GetChannel() != |
+ chrome::VersionInfo::CHANNEL_CANARY) { |
+ return SET_DEFAULT_UNATTENDED; |
+ } |
+ |
+ return SET_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() != SET_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 (CanSetAsDefaultProtocolClient() != SET_DEFAULT_UNATTENDED) |
return false; |
// We really do want the main bundle here since it makes sense to set an |