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

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: Small modification of null check 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') | no next file with comments »
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 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 // Simulate the exchange of candidates. 546 // Simulate the exchange of candidates.
547 ConnectChannels_w(); 547 ConnectChannels_w();
548 dest->ConnectChannels_w(); 548 dest->ConnectChannels_w();
549 for (auto& kv : transports()) { 549 for (auto& kv : transports()) {
550 FakeTransport* transport = static_cast<FakeTransport*>(kv.second); 550 FakeTransport* transport = static_cast<FakeTransport*>(kv.second);
551 transport->SetDestination(dest->GetTransport_w(kv.first)); 551 transport->SetDestination(dest->GetTransport_w(kv.first));
552 } 552 }
553 } 553 }
554 554
555 void ConnectChannels_w() { 555 void ConnectChannels_w() {
556 TransportDescription faketransport_desc(
557 std::vector<std::string>(),
558 rtc::CreateRandomString(cricket::ICE_UFRAG_LENGTH),
559 rtc::CreateRandomString(cricket::ICE_PWD_LENGTH), cricket::ICEMODE_FULL,
560 cricket::CONNECTIONROLE_NONE, nullptr);
556 for (auto& kv : transports()) { 561 for (auto& kv : transports()) {
557 FakeTransport* transport = static_cast<FakeTransport*>(kv.second); 562 FakeTransport* transport = static_cast<FakeTransport*>(kv.second);
563 // Set local transport description for FakeTransport before connecting.
564 // Otherwise, the RTC_CHECK in Transport.ConnectChannel will fail.
565 if (!transport->local_description()) {
566 transport->SetLocalTransportDescription(faketransport_desc,
567 cricket::CA_OFFER, nullptr);
568 }
558 transport->ConnectChannels(); 569 transport->ConnectChannels();
559 transport->MaybeStartGathering(); 570 transport->MaybeStartGathering();
560 } 571 }
561 } 572 }
562 573
563 private: 574 private:
564 bool fail_create_channel_; 575 bool fail_create_channel_;
565 }; 576 };
566 577
567 } // namespace cricket 578 } // namespace cricket
568 579
569 #endif // WEBRTC_P2P_BASE_FAKETRANSPORTCONTROLLER_H_ 580 #endif // WEBRTC_P2P_BASE_FAKETRANSPORTCONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/p2p/base/transport.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698