Adopt absl::string_view in CopyOnWriteBuffer

Bug: webrtc:13579
Change-Id: Ia2b99a28ed0c103215e8616da67a5c961b957199
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260465
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36832}
diff --git a/rtc_base/copy_on_write_buffer.h b/rtc_base/copy_on_write_buffer.h
index 6837f06..849f5f5 100644
--- a/rtc_base/copy_on_write_buffer.h
+++ b/rtc_base/copy_on_write_buffer.h
@@ -19,6 +19,7 @@
 #include <type_traits>
 #include <utility>
 
+#include "absl/strings/string_view.h"
 #include "api/scoped_refptr.h"
 #include "rtc_base/buffer.h"
 #include "rtc_base/checks.h"
@@ -38,7 +39,7 @@
   CopyOnWriteBuffer(CopyOnWriteBuffer&& buf);
 
   // Construct a buffer from a string, convenient for unittests.
-  CopyOnWriteBuffer(const std::string& s);
+  explicit CopyOnWriteBuffer(absl::string_view s);
 
   // Construct a buffer with the specified number of uninitialized bytes.
   explicit CopyOnWriteBuffer(size_t size);