Reland "Write string_view to fd".

This reverts commit fdf530bb8b6767457e07610e88368898d8c682c3, fixing
the ABI incompatibility.

Bug: 170405615
Test: atest libbase_test
Change-Id: I5f376f522afd911851af7b8573ca90e31a11742e
diff --git a/file.cpp b/file.cpp
index 71683fd..f4f3ad4 100644
--- a/file.cpp
+++ b/file.cpp
@@ -245,7 +245,7 @@
   return ReadFdToString(fd, content);
 }
 
-bool WriteStringToFd(const std::string& content, borrowed_fd fd) {
+bool WriteStringToFd(std::string_view content, borrowed_fd fd) {
   const char* p = content.data();
   size_t left = content.size();
   while (left > 0) {