set mac protocol to none (#13326)

This commit is contained in:
trop[bot] 2018-06-20 17:10:23 +10:00 committed by Samuel Attard
parent fc12b5cab3
commit 9bda7d0b73

View file

@ -78,6 +78,11 @@ bool Browser::RemoveAsDefaultProtocolClient(const std::string& protocol,
}
}
// No other app was found set it to none instead of setting it back to itself.
if ([identifier isEqualToString:(__bridge NSString*)other]) {
other = base::mac::NSToCFCast(@"None");
}
OSStatus return_code = LSSetDefaultHandlerForURLScheme(protocol_cf, other);
return return_code == noErr;
}