Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1405)

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

Issue 1709953002: Revert of Remove GetTransport() from TransportChannelImpl (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« 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 82f4ebdc7b1d24c31169afb1f5e4364508726f60..65c59be98d0ee93777f6454e8742ded125caf5b1 100644
--- a/webrtc/p2p/base/faketransportcontroller.h
+++ b/webrtc/p2p/base/faketransportcontroller.h
@@ -45,9 +45,11 @@
class FakeTransportChannel : public TransportChannelImpl,
public rtc::MessageHandler {
public:
- explicit FakeTransportChannel(const std::string& name,
+ explicit FakeTransportChannel(Transport* transport,
+ const std::string& name,
int component)
: TransportChannelImpl(name, component),
+ transport_(transport),
dtls_fingerprint_("", nullptr, 0) {}
~FakeTransportChannel() { Reset(); }
@@ -64,6 +66,8 @@
// If async, will send packets by "Post"-ing to message queue instead of
// synchronously "Send"-ing.
void SetAsync(bool async) { async_ = async; }
+
+ Transport* GetTransport() override { return transport_; }
TransportChannelState GetState() const override {
if (connection_count_ == 0) {
@@ -309,6 +313,7 @@
private:
enum State { STATE_INIT, STATE_CONNECTING, STATE_CONNECTED };
+ Transport* transport_;
FakeTransportChannel* dest_ = nullptr;
State state_ = STATE_INIT;
bool async_ = false;
@@ -410,7 +415,7 @@
return nullptr;
}
FakeTransportChannel* channel =
- new FakeTransportChannel(name(), component);
+ new FakeTransportChannel(this, 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
This is Rietveld 408576698