I would like to add both mini-USB and micro-USB connectors onto my PCB for Li-Ion battery charging. Is the attached schematic fine (safe) ? I have never tried such type of connection yet and it would be nice to get a advice from experienced engineers before producing my PCB. Googling the problem didn't give me any useful results.
The diodes are a good idea; this way, current from a powered USB port cannot flow into e.g. a powered-off device.
This should work. The fuse might, however, be slower to blow than the diodes (depending on input voltage); it's still a valid protection mechanism for the components behind it, so keep it.
Jet another aspect: if a voltage spike > 21 V comes in from one USB port, that's above the breakdown voltage of the other's diode. Maybe add another diode in reverse between your diode's output and ground – that way, such spikes are going to be shorted to ground without hurting anyone.
One could argue that you're not protecting against ground currents, but that'd be a rather uncommon thing to expect from a USB-powered device.
Whether or not this is the perfect choice is hard to say without knowing for what purpose you're building this. There's a lot of "power selector" ICs that can, for example, smartly pick the right voltage source autonomously, with significantly lower loss than your "current · B330b forward voltage". There might be additional benefits to using those (protection, power source information pins…), but again: impossible to know without knowing what you're powering here.