Added StringPiece overloads for base::JoinString.

The new overloads take std::vector<StringPiece> and
std::initializer_list<StringPiece>. The former allows you to pass a
vector of StringPieces without copying them into strings. The latter is
now required to break ambiguity when used with a literal initializer
list (otherwise the compiler would not be able to decide between the two
other overloads).

ShareServiceImpl now uses base::JoinString instead of its own local
version. I am moving it to base because it is widely applicable (in many
cases more efficient than JoinString(vector<string>)).

BUG=348241

Review-Url: https://codereview.chromium.org/2691193002
Cr-Commit-Position: refs/heads/master@{#452432}


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