Add docs, avoid side effects when not currently default
This commit is contained in:
parent
19d5d3b7d1
commit
ac905e7080
2 changed files with 4 additions and 4 deletions
|
@ -47,6 +47,9 @@ bool Browser::RemoveAsDefaultProtocolClient(const std::string& protocol) {
|
|||
if (!identifier)
|
||||
return false;
|
||||
|
||||
if (!Browser::IsDefaultProtocolClient(protocol))
|
||||
return false;
|
||||
|
||||
NSString* protocol_ns = [NSString stringWithUTF8String:protocol.c_str()];
|
||||
CFStringRef protocol_cf = base::mac::NSToCFCast(protocol_ns);
|
||||
CFArrayRef bundleList = LSCopyAllHandlersForURLScheme(protocol_cf);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue