Following his article about Glock safety Rob has written an article explaining the differences between the safeties in the Glock and XD.

If the Glock firing pin is partially retracted and the Springfield XD is fully retracted we could draw the conclusion that the Glock is half-cocked while the XD is cocked and locked. Both will fire if there is an accident. Both have safeties in place to prevent this from happening. If the only unique safety on the XD’s is the grip safety, how does it work? It looks like the grip safety on the 1911, but it definitely does not quack like the same duck.
More here.
Glock pistols do not have an external safety that be can engaged and disengaged at will. Instead Glocks have various internal safety

mechanisms to ensure the pistol does not fire a round unless the trigger is pulled, ie. not when dropped, knocked etc.
Rob has written a interesting blog entry explaining how the internal Glock safeties works.
Understanding how your weapons safeties work is also of critical importance. Glock, even though it has no external safeties is no exception.
So that out of the way we can begin discussing how Glock is looking out for you. As you may know the firing pin is under 2/3rds pressure when the slide is charged. As soon as you place a round in the chamber there is pressure, and therby a possibility, however remote, that the round may go off.
More here.
UPDATE: Famous Guns has more information here.