I've done this several times for both the front and back glass (never at the same time).
For the front glass, you can pay the $199 ($149 I think for the iPhone 4) and they will give you a brand new (refurbed) iPhone 4.
For the back glass, they will take it into the back and replace it. Takes them about 10 minutes tops. Doing this cost me $29