Adopt absl::string_view in function parameters under rtc_base/
This is part of a large-scale effort to increase adoption of
absl::string_view across the WebRTC code base.
This CL converts the majority of "const std::string&"s in function
parameters under rtc_base/ to absl::string_view.
Bug: webrtc:13579
Change-Id: I2b1e3776aa42326aa405f76bb324a2d233b21dca
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/254081
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Anders Lilienthal <andersc@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36239}
diff --git a/rtc_base/rtc_certificate.h b/rtc_base/rtc_certificate.h
index 0102c4f..67c5c29 100644
--- a/rtc_base/rtc_certificate.h
+++ b/rtc_base/rtc_certificate.h
@@ -17,6 +17,7 @@
#include <string>
#include "absl/base/attributes.h"
+#include "absl/strings/string_view.h"
#include "api/ref_counted_base.h"
#include "api/scoped_refptr.h"
#include "rtc_base/system/rtc_export.h"
@@ -35,8 +36,8 @@
// the string representations used by OpenSSL.
class RTCCertificatePEM {
public:
- RTCCertificatePEM(const std::string& private_key,
- const std::string& certificate)
+ RTCCertificatePEM(absl::string_view private_key,
+ absl::string_view certificate)
: private_key_(private_key), certificate_(certificate) {}
const std::string& private_key() const { return private_key_; }