Merge some repeated code in ImageBitmapFactories into a helper function

TBR=junov@chromium.org

Review-Url: https://codereview.chromium.org/2122273002
Cr-Commit-Position: refs/heads/master@{#404044}
2 files changed