Inclusive language in //rtc_base.

Bug: webrtc:11680
Change-Id: I498199afb5e52fd9047afff96b45fa5dfa356606
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178393
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31633}
This commit is contained in:
Mirko Bonadei
2020-06-30 14:24:09 +02:00
committed by Commit Bot
parent c7f0dff191
commit c3efe1abfa
2 changed files with 11 additions and 11 deletions

View File

@ -174,7 +174,7 @@ void NATServer::OnInternalUDPPacket(AsyncPacketSocket* socket,
RTC_DCHECK(iter != int_map_->end()); RTC_DCHECK(iter != int_map_->end());
// Allow the destination to send packets back to the source. // Allow the destination to send packets back to the source.
iter->second->WhitelistInsert(dest_addr); iter->second->AllowlistInsert(dest_addr);
// Send the packet to its intended destination. // Send the packet to its intended destination.
rtc::PacketOptions options; rtc::PacketOptions options;
@ -227,29 +227,29 @@ void NATServer::Translate(const SocketAddressPair& route) {
bool NATServer::ShouldFilterOut(TransEntry* entry, bool NATServer::ShouldFilterOut(TransEntry* entry,
const SocketAddress& ext_addr) { const SocketAddress& ext_addr) {
return entry->WhitelistContains(ext_addr); return entry->AllowlistContains(ext_addr);
} }
NATServer::TransEntry::TransEntry(const SocketAddressPair& r, NATServer::TransEntry::TransEntry(const SocketAddressPair& r,
AsyncUDPSocket* s, AsyncUDPSocket* s,
NAT* nat) NAT* nat)
: route(r), socket(s) { : route(r), socket(s) {
whitelist = new AddressSet(AddrCmp(nat)); allowlist = new AddressSet(AddrCmp(nat));
} }
NATServer::TransEntry::~TransEntry() { NATServer::TransEntry::~TransEntry() {
delete whitelist; delete allowlist;
delete socket; delete socket;
} }
void NATServer::TransEntry::WhitelistInsert(const SocketAddress& addr) { void NATServer::TransEntry::AllowlistInsert(const SocketAddress& addr) {
CritScope cs(&crit_); CritScope cs(&crit_);
whitelist->insert(addr); allowlist->insert(addr);
} }
bool NATServer::TransEntry::WhitelistContains(const SocketAddress& ext_addr) { bool NATServer::TransEntry::AllowlistContains(const SocketAddress& ext_addr) {
CritScope cs(&crit_); CritScope cs(&crit_);
return whitelist->find(ext_addr) == whitelist->end(); return allowlist->find(ext_addr) == allowlist->end();
} }
} // namespace rtc } // namespace rtc

View File

@ -96,12 +96,12 @@ class NATServer : public sigslot::has_slots<> {
TransEntry(const SocketAddressPair& r, AsyncUDPSocket* s, NAT* nat); TransEntry(const SocketAddressPair& r, AsyncUDPSocket* s, NAT* nat);
~TransEntry(); ~TransEntry();
void WhitelistInsert(const SocketAddress& addr); void AllowlistInsert(const SocketAddress& addr);
bool WhitelistContains(const SocketAddress& ext_addr); bool AllowlistContains(const SocketAddress& ext_addr);
SocketAddressPair route; SocketAddressPair route;
AsyncUDPSocket* socket; AsyncUDPSocket* socket;
AddressSet* whitelist; AddressSet* allowlist;
CriticalSection crit_; CriticalSection crit_;
}; };