Adopt absl::string_view in rtc_base/ (straightforward cases)
Bug: webrtc:13579
Change-Id: I240db6285abb22652242bc0b2ebe9844ec4a45f0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258723
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36561}
diff --git a/rtc_base/system/file_wrapper.h b/rtc_base/system/file_wrapper.h
index b55b0b9..5e1e3d6 100644
--- a/rtc_base/system/file_wrapper.h
+++ b/rtc_base/system/file_wrapper.h
@@ -16,6 +16,8 @@
#include <string>
+#include "absl/strings/string_view.h"
+
// Implementation that can read (exclusive) or write from/to a file.
namespace webrtc {
@@ -34,11 +36,8 @@
// returned object to check if the open operation was successful. On failure,
// and if `error` is non-null, the system errno value is stored at |*error|.
// The file is closed by the destructor.
- static FileWrapper OpenReadOnly(const char* file_name_utf8);
- static FileWrapper OpenReadOnly(const std::string& file_name_utf8);
- static FileWrapper OpenWriteOnly(const char* file_name_utf8,
- int* error = nullptr);
- static FileWrapper OpenWriteOnly(const std::string& file_name_utf8,
+ static FileWrapper OpenReadOnly(absl::string_view file_name_utf8);
+ static FileWrapper OpenWriteOnly(absl::string_view file_name_utf8,
int* error = nullptr);
FileWrapper() = default;