set mac protocol to none (#13325)

This commit is contained in:
trop[bot]
2018-06-19 22:39:07 -07:00
committed by Shelley Vohr
parent 34dbe5f176
commit ba23c0d600

View File

@@ -77,6 +77,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;
}