Some code reorganization needed for an internal change.

R=fikes


git-svn-id: http://snappy.googlecode.com/svn/trunk@75 03e5f5b5-db94-4691-08a0-1a8bf15f6143