Added original code.

From change bc7a9898fe83 (Apr 20, 2011) of the GoogleCode original project.