Pass StringPiece(16)? by value in //base/strings

As recommended by string_piece.h this patch changes all the other
headers in //base/strings with methods that take a StringPiece or
StringPiece16 to receive it by value rather than const-reference.

Change-Id: Id87fb8481e136518029fabb82f5e5a1db19a2b9e
Reviewed-on: https://chromium-review.googlesource.com/848511
Reviewed-by: Gabriel Charette <[email protected]>
Reviewed-by: Luke Z <[email protected]>
Reviewed-by: Ryo Hashimoto <[email protected]>
Commit-Queue: Reilly Grant <[email protected]>
Cr-Commit-Position: refs/heads/master@{#527440}
diff --git a/base/strings/sys_string_conversions_posix.cc b/base/strings/sys_string_conversions_posix.cc
index cc039db..6b1591c 100644
--- a/base/strings/sys_string_conversions_posix.cc
+++ b/base/strings/sys_string_conversions_posix.cc
@@ -18,7 +18,7 @@
   // than our ICU, but this will do for now.
   return WideToUTF8(wide);
 }
-std::wstring SysUTF8ToWide(const StringPiece& utf8) {
+std::wstring SysUTF8ToWide(StringPiece utf8) {
   // In theory this should be using the system-provided conversion rather
   // than our ICU, but this will do for now.
   std::wstring out;
@@ -34,7 +34,7 @@
   return WideToUTF8(wide);
 }
 
-std::wstring SysNativeMBToWide(const StringPiece& native_mb) {
+std::wstring SysNativeMBToWide(StringPiece native_mb) {
   return SysUTF8ToWide(native_mb);
 }
 
@@ -100,7 +100,7 @@
   return out;
 }
 
-std::wstring SysNativeMBToWide(const StringPiece& native_mb) {
+std::wstring SysNativeMBToWide(StringPiece native_mb) {
   mbstate_t ps;
 
   // Calculate the number of wide characters.  We walk through the string