Remove transport_name_ from Channel.

Because of this (seemingly simple) change, I had to change the return
type of transport_name from `const std::string&` to `absl::string_view`
to handle the case when there's no transport assigned.
That in turn caused an avalanche of required updates.

Bug: webrtc:12230, webrtc:11993
Change-Id: I16ec6c6a5fc2f5f7c7de572355a3c6ca924bb9d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/244084
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35617}
This commit is contained in:
Tomas Gunnarsson
2022-01-03 14:59:12 +00:00
committed by WebRTC LUCI CQ
parent 8a5ac16fbf
commit 94f0194d5a
15 changed files with 28 additions and 32 deletions

View File

@ -14,6 +14,7 @@
#include <string>
#include <vector>
#include "absl/strings/string_view.h"
#include "api/jsep.h"
#include "api/media_types.h"
#include "media/base/media_channel.h"
@ -32,8 +33,11 @@ class ChannelInterface {
virtual MediaChannel* media_channel() const = 0;
// Returns a string view for the transport name. Fetching the transport name
// must be done on the network thread only and note that the lifetime of
// the returned object should be assumed to only be the calling scope.
// TODO(deadbeef): This is redundant; remove this.
virtual const std::string& transport_name() const = 0;
virtual absl::string_view transport_name() const = 0;
virtual const std::string& content_name() const = 0;