upstream cl: https://codereview.chromium.org/47073002/