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

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

Issue 2099563004: Start ICE connectivity checks as soon as the first pair is pingable. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Removing debug log message, adding missing UpdateState. Created 4 years, 6 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/p2ptransportchannel.h » ('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 7b7aec59080ea2a50a5cc7b6dbb70d7265cd9717..c96acda5d71a07c9dbda8176effe89852eaec8b9 100644
--- a/webrtc/p2p/base/faketransportcontroller.h
+++ b/webrtc/p2p/base/faketransportcontroller.h
@@ -111,12 +111,6 @@ class FakeTransportChannel : public TransportChannelImpl,
return true;
}
- void Connect() override {
- if (state_ == STATE_INIT) {
- state_ = STATE_CONNECTING;
- }
- }
-
void MaybeStartGathering() override {
if (gathering_state_ == kIceGatheringNew) {
gathering_state_ = kIceGatheringGathering;
@@ -145,7 +139,7 @@ class FakeTransportChannel : public TransportChannelImpl,
// If |asymmetric| is true this method only affects this FakeTransportChannel.
// If false, it affects |dest| as well.
void SetDestination(FakeTransportChannel* dest, bool asymmetric = false) {
- if (state_ == STATE_CONNECTING && dest) {
+ if (state_ == STATE_INIT && dest) {
// This simulates the delivery of candidates.
dest_ = dest;
if (local_cert_ && dest_->local_cert_) {
@@ -160,7 +154,7 @@ class FakeTransportChannel : public TransportChannelImpl,
} else if (state_ == STATE_CONNECTED && !dest) {
// Simulates loss of connectivity, by asymmetrically forgetting dest_.
dest_ = nullptr;
- state_ = STATE_CONNECTING;
+ state_ = STATE_INIT;
set_writable(false);
}
}
@@ -314,7 +308,7 @@ class FakeTransportChannel : public TransportChannelImpl,
}
}
- enum State { STATE_INIT, STATE_CONNECTING, STATE_CONNECTED };
+ enum State { STATE_INIT, STATE_CONNECTED };
FakeTransportChannel* dest_ = nullptr;
State state_ = STATE_INIT;
bool async_ = false;
@@ -578,7 +572,6 @@ class FakeTransportController : public TransportController {
transport->SetLocalTransportDescription(faketransport_desc,
cricket::CA_OFFER, nullptr);
}
- transport->ConnectChannels();
transport->MaybeStartGathering();
}
}
« no previous file with comments | « webrtc/p2p/base/dtlstransportchannel.cc ('k') | webrtc/p2p/base/p2ptransportchannel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698