Chromium Code Reviews

Unified Diff: webrtc/p2p/base/faketransportcontroller.h

Issue 1691673002: Remove GetTransport() from TransportChannelImpl (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Restore deleted P2PTransportChannel constructor (and mark deprecated) to not break Chromium Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « webrtc/p2p/base/dtlstransportchannel.cc ('k') | webrtc/p2p/base/p2ptransport.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/faketransportcontroller.h
diff --git a/webrtc/p2p/base/faketransportcontroller.h b/webrtc/p2p/base/faketransportcontroller.h
index 65c59be98d0ee93777f6454e8742ded125caf5b1..63e8fd31240d6c7385baea98effa1c65cd4ee436 100644
--- a/webrtc/p2p/base/faketransportcontroller.h
+++ b/webrtc/p2p/base/faketransportcontroller.h
@@ -45,11 +45,8 @@ struct PacketMessageData : public rtc::MessageData {
class FakeTransportChannel : public TransportChannelImpl,
public rtc::MessageHandler {
public:
- explicit FakeTransportChannel(Transport* transport,
- const std::string& name,
- int component)
+ explicit FakeTransportChannel(const std::string& name, int component)
: TransportChannelImpl(name, component),
- transport_(transport),
dtls_fingerprint_("", nullptr, 0) {}
~FakeTransportChannel() { Reset(); }
@@ -67,8 +64,6 @@ class FakeTransportChannel : public TransportChannelImpl,
// synchronously "Send"-ing.
void SetAsync(bool async) { async_ = async; }
- Transport* GetTransport() override { return transport_; }
-
TransportChannelState GetState() const override {
if (connection_count_ == 0) {
return had_connection_ ? TransportChannelState::STATE_FAILED
@@ -313,7 +308,6 @@ class FakeTransportChannel : public TransportChannelImpl,
private:
enum State { STATE_INIT, STATE_CONNECTING, STATE_CONNECTED };
- Transport* transport_;
FakeTransportChannel* dest_ = nullptr;
State state_ = STATE_INIT;
bool async_ = false;
@@ -414,8 +408,7 @@ class FakeTransport : public Transport {
if (channels_.find(component) != channels_.end()) {
return nullptr;
}
- FakeTransportChannel* channel =
- new FakeTransportChannel(this, name(), component);
+ FakeTransportChannel* channel = new FakeTransportChannel(name(), component);
channel->set_ssl_max_protocol_version(ssl_max_version_);
channel->SetAsync(async_);
SetChannelDestination(component, channel);
« no previous file with comments | « webrtc/p2p/base/dtlstransportchannel.cc ('k') | webrtc/p2p/base/p2ptransport.cc » ('j') | no next file with comments »

Powered by Google App Engine