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

Unified Diff: webrtc/p2p/base/p2ptransportchannel.cc

Issue 2095263002: Delete a method that was not used. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: 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/p2ptransportchannel.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/p2ptransportchannel.cc
diff --git a/webrtc/p2p/base/p2ptransportchannel.cc b/webrtc/p2p/base/p2ptransportchannel.cc
index 1eb63c5e69577269d7f0a8783a37c640246d337f..61de2491bfcf981e8d779e67b373bd8041ec0a12 100644
--- a/webrtc/p2p/base/p2ptransportchannel.cc
+++ b/webrtc/p2p/base/p2ptransportchannel.cc
@@ -1092,40 +1092,6 @@ bool P2PTransportChannel::PresumedWritable(const Connection* conn) const {
conn->remote_candidate().type() == PRFLX_PORT_TYPE));
}
-// Determines whether we should switch between two connections, based first on
-// connection states, static preferences, and then (if those are equal) on
-// latency estimates.
-bool P2PTransportChannel::ShouldSwitchSelectedConnection(
- const Connection* selected,
- const Connection* conn) const {
- if (selected == conn) {
- return false;
- }
-
- if (!selected || !conn) { // don't think the latter should happen
- return true;
- }
-
- // We prefer to switch to a writable and receiving connection over a
- // non-writable or non-receiving connection, even if the latter has
- // been nominated by the controlling side.
- int state_cmp = CompareConnectionStates(selected, conn);
- if (state_cmp != 0) {
- return state_cmp < 0;
- }
- if (ice_role_ == ICEROLE_CONTROLLED && selected->nominated()) {
- LOG(LS_VERBOSE) << "Controlled side did not switch due to nominated status";
- return false;
- }
-
- int prefs_cmp = CompareConnectionCandidates(selected, conn);
- if (prefs_cmp != 0) {
- return prefs_cmp < 0;
- }
-
- return selected->rtt() - conn->rtt() >= kMinImprovement;
-}
-
// Sort the available connections to find the best one. We also monitor
// the number of available connections and the current state.
void P2PTransportChannel::SortConnections() {
« no previous file with comments | « webrtc/p2p/base/p2ptransportchannel.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698