Don't unnecessarily copy strings

Add a function base::SplitStringPieceUsingSubstr that splits a string
using a substring delimiter without copying the string parts. Use it in
HttpRequestHeaders::AddHeadersFromString.

BUG=572076

Review URL: https://codereview.chromium.org/1549063003

Cr-Commit-Position: refs/heads/master@{#367504}


CrOS-Libchrome-Original-Commit: 0e8b35ae352e71ea43bf1dc9f6b68128dc8ab187
3 files changed
tree: 030b669109c7031cdbb3f635faea045f5281b721
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/