In your pocket without a holster?...
Neither.
I own a G27 and carried it without a holster in my waistband/small-of-back, but without a round in the chamber. Worked quite well, but I knew that I'd be screwed if something happened quickly and I needed to shoot NOW. I now carry in a Blackhawk SERPA CQC holster and CC and OC regularly.
If you intend on carrying with a round in the chamber, I highly suggest a holster. There are holsters out there specifically designed for use in your pocket and there are pistols specifically designed to fit in a pocket; referred to as "pocket pistols" oddly enough.
Even with the safety on with the XD, the trigger's uncovered and that's asking for an accident such as the safety being bumped off if you run into something or just sit down and the firearm shifts. Also, neither the XD nor the G27 will properly conceal in a pocket (unless you really want everyone to know you are "concealing" a gun in your pocket). I'd suggest checking out something like the
Kel-Tec P3AT or the
Bersa Thunder .380 then check out a holster such as these:
Kel-Tec Pocket/Wallet Holster Galco holsters; Holsters; Gun holster, pistol holsters, western holsters, shoulder holsters, leather holster and Glock holsters
Now, that all said, I think you need to think about why you need to carry in your pocket and not in a hip or shoulder holster. I mean, I conceal with that SERPA outside-the-waistband holster with only a light, un-bottoned, button-down overshirt and no one is the wiser. You might consider taking a CC class, as you may find that you can conceal a lot better with a gun that fits you better in a way other than in your pocket.