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

Unified Diff: chrome/browser/shell_integration_mac.mm

Issue 1832853003: DefaultBrowserWorker now fully supports opening the settings for Win10 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix mac compilation Created 4 years, 8 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
Index: chrome/browser/shell_integration_mac.mm
diff --git a/chrome/browser/shell_integration_mac.mm b/chrome/browser/shell_integration_mac.mm
index 2ae55e18078079044e4332a91c21e57ae5ca6b69..4fcf4b98b307a61a1c2f47b09b710a2dace8aa59 100644
--- a/chrome/browser/shell_integration_mac.mm
+++ b/chrome/browser/shell_integration_mac.mm
@@ -53,7 +53,7 @@ bool IsIdentifierDefaultProtocolClient(NSString* identifier,
// applies only for the current user. Returns false if this cannot be done, or
// if the operation fails.
bool SetAsDefaultBrowser() {
- if (CanSetAsDefaultBrowser() != SET_DEFAULT_UNATTENDED)
+ if (CanSetAsDefaultBrowser())
return false;
// We really do want the outer bundle here, not the main bundle since setting
@@ -73,7 +73,7 @@ bool SetAsDefaultProtocolClient(const std::string& protocol) {
if (protocol.empty())
return false;
- if (CanSetAsDefaultProtocolClient() != SET_DEFAULT_UNATTENDED)
+ if (GetDefaultWebClientSetPermission() != SET_DEFAULT_UNATTENDED)
return false;
// We really do want the main bundle here since it makes sense to set an
@@ -89,12 +89,12 @@ bool SetAsDefaultProtocolClient(const std::string& protocol) {
return return_code == noErr;
}
-DefaultWebClientSetPermission CanSetAsDefaultBrowser() {
- if (chrome::GetChannel() != version_info::Channel::CANARY) {
- return SET_DEFAULT_UNATTENDED;
+DefaultWebClientSetPermission GetDefaultWebClientSetPermission() {
+ if (chrome::GetChannel() == version_info::Channel::CANARY) {
+ return SET_DEFAULT_NOT_ALLOWED;
}
- return SET_DEFAULT_NOT_ALLOWED;
+ return SET_DEFAULT_UNATTENDED;
}
base::string16 GetApplicationNameForProtocol(const GURL& url) {

Powered by Google App Engine
This is Rietveld 408576698