Avoid a string copy in URLRequestResourceBundleJob::GetData().
This adds a URLRequestSimpleJob::GetStringPieceData method with which a subclass
can provide its own storage for the result string, instead of having to copy the
whole thing into the URLRequestSimpleJob.
I also made base::IsStringUTF8 take a StringPiece to avoid a copy there.
BUG=422489
Review URL: https://codereview.chromium.org/725443003
Cr-Commit-Position: refs/heads/master@{#304445}
CrOS-Libchrome-Original-Commit: 3edf2fec6af00f9a3928edf5b67e77464c47819a
3 files changed