aboutsummaryrefslogtreecommitdiff
path: root/p2p
diff options
context:
space:
mode:
authorAli Tofigh <alito@webrtc.org>2022-03-17 15:47:49 +0100
committerWebRTC LUCI CQ <webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-03-17 15:39:26 +0000
commit7fa9057a0558e315f822c505b1f4516952c9f6cc (patch)
tree5eabbb2add5558f6b206502b9f204fb90ca7cb7a /p2p
parent1a08096998a38a40f76ed7b014805c3d7edfac4d (diff)
downloadwebrtc-7fa9057a0558e315f822c505b1f4516952c9f6cc.tar.gz
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}
Diffstat (limited to 'p2p')
-rw-r--r--p2p/base/port.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/p2p/base/port.cc b/p2p/base/port.cc
index f864150969..a061688b72 100644
--- a/p2p/base/port.cc
+++ b/p2p/base/port.cc
@@ -19,6 +19,7 @@
#include "absl/algorithm/container.h"
#include "absl/strings/match.h"
+#include "absl/strings/string_view.h"
#include "p2p/base/connection.h"
#include "p2p/base/port_allocator.h"
#include "rtc_base/checks.h"
@@ -301,7 +302,7 @@ bool Port::MaybeObfuscateAddress(Candidate* c,
auto copy = *c;
auto weak_ptr = weak_factory_.GetWeakPtr();
auto callback = [weak_ptr, copy, is_final](const rtc::IPAddress& addr,
- const std::string& name) mutable {
+ absl::string_view name) mutable {
RTC_DCHECK(copy.address().ipaddr() == addr);
rtc::SocketAddress hostname_address(name, copy.address().port());
// In Port and Connection, we need the IP address information to