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

Side by Side Diff: webrtc/p2p/base/faketransportcontroller.h

Issue 1844133002: Remove the dead code in Transport::ConnectChannels (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Modified the FakeTransportController Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/p2p/base/transport.cc » ('j') | webrtc/p2p/base/transport.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2009 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2009 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 // Simulate the exchange of candidates. 547 // Simulate the exchange of candidates.
548 ConnectChannels_w(); 548 ConnectChannels_w();
549 dest->ConnectChannels_w(); 549 dest->ConnectChannels_w();
550 for (auto& kv : transports()) { 550 for (auto& kv : transports()) {
551 FakeTransport* transport = static_cast<FakeTransport*>(kv.second); 551 FakeTransport* transport = static_cast<FakeTransport*>(kv.second);
552 transport->SetDestination(dest->GetTransport_w(kv.first)); 552 transport->SetDestination(dest->GetTransport_w(kv.first));
553 } 553 }
554 } 554 }
555 555
556 void ConnectChannels_w() { 556 void ConnectChannels_w() {
557 TransportDescription faketransport_desc(
558 std::vector<std::string>(),
559 rtc::CreateRandomString(cricket::ICE_UFRAG_LENGTH),
560 rtc::CreateRandomString(cricket::ICE_PWD_LENGTH), cricket::ICEMODE_FULL,
561 cricket::CONNECTIONROLE_NONE, nullptr);
557 for (auto& kv : transports()) { 562 for (auto& kv : transports()) {
558 FakeTransport* transport = static_cast<FakeTransport*>(kv.second); 563 FakeTransport* transport = static_cast<FakeTransport*>(kv.second);
564 // Set local transport description for FakeTransport before connecting.
565 // Otherwise, the RTC_CHECK in Transport.ConnectChannel will fail.
566 if (!transport->local_description()) {
567 transport->SetLocalTransportDescription(faketransport_desc,
568 cricket::CA_OFFER, nullptr);
569 }
559 transport->ConnectChannels(); 570 transport->ConnectChannels();
560 transport->MaybeStartGathering(); 571 transport->MaybeStartGathering();
561 } 572 }
562 } 573 }
563 574
564 private: 575 private:
565 bool fail_create_channel_; 576 bool fail_create_channel_;
566 }; 577 };
567 578
568 } // namespace cricket 579 } // namespace cricket
569 580
570 #endif // WEBRTC_P2P_BASE_FAKETRANSPORTCONTROLLER_H_ 581 #endif // WEBRTC_P2P_BASE_FAKETRANSPORTCONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/p2p/base/transport.cc » ('j') | webrtc/p2p/base/transport.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698