Fix MSVC warnings about possible value truncation.

Patch from Peter Kasting <pkasting@chromium.org>

BUG=81439
TEST=none
Review URL:https://codereview.chromium.org/512923003/