Change base::HexStringToBytes to take a StringPiece

This function is sometimes called with a base::StringPiece by first
converting it to an std::string. This is inefficent since it performs an
unnecessary copy. The signature has been updated and all the callsites
I could find where as_string() is called on a base::StringPiece have
been changed.

Change-Id: I1f9c674d61fe9f9835e89e40e7de0224b709ac57
Reviewed-on: https://chromium-review.googlesource.com/847852
Reviewed-by: Joshua Pawlicki <waffles@chromium.org>
Reviewed-by: Bence Béky <bnc@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526829}

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