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
tree: 7eecf2c4a375c74cb5df357fa5f654fe4232d2c2
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/