Rebased to chromium's bd297c3f0d9a9ddf2c74d30147ed4