Avoid UTF-8->UTF-16 conversion in HashAndUTF8CharactersTranslator

The Translate() function can use the same check as Equal() to determine
if the string is ASCII-only. Saving a conversion from UTF-8 to UTF-16.

Bug: 889183
Change-Id: Ieffab05f34a1e4a2ef725e298e7f15e7ff14a3f8
Reviewed-on: https://chromium-review.googlesource.com/c/1257928
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Yuta Kitamura <yutak@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596556}
1 file changed