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

Side by Side Diff: webrtc/p2p/base/transport.cc

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 | « webrtc/p2p/base/faketransportcontroller.h ('k') | webrtc/p2p/base/transport_unittest.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 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 channels_.erase(iter); 220 channels_.erase(iter);
221 DestroyTransportChannel(channel); 221 DestroyTransportChannel(channel);
222 } 222 }
223 223
224 void Transport::ConnectChannels() { 224 void Transport::ConnectChannels() {
225 if (connect_requested_ || channels_.empty()) 225 if (connect_requested_ || channels_.empty())
226 return; 226 return;
227 227
228 connect_requested_ = true; 228 connect_requested_ = true;
229 229
230 if (!local_description_) { 230 RTC_DCHECK(local_description_);
231 // TOOD(mallinath) : TransportDescription(TD) shouldn't be generated here.
232 // As Transport must know TD is offer or answer and cricket::Transport
233 // doesn't have the capability to decide it. This should be set by the
234 // Session.
235 // Session must generate local TD before remote candidates pushed when
236 // initiate request initiated by the remote.
237 LOG(LS_INFO) << "Transport::ConnectChannels: No local description has "
238 << "been set. Will generate one.";
239 TransportDescription desc(std::vector<std::string>(),
240 rtc::CreateRandomString(ICE_UFRAG_LENGTH),
241 rtc::CreateRandomString(ICE_PWD_LENGTH),
242 ICEMODE_FULL, CONNECTIONROLE_NONE, nullptr);
243 SetLocalTransportDescription(desc, CA_OFFER, nullptr);
244 }
245 231
246 CallChannels(&TransportChannelImpl::Connect); 232 CallChannels(&TransportChannelImpl::Connect);
247 } 233 }
248 234
249 void Transport::MaybeStartGathering() { 235 void Transport::MaybeStartGathering() {
250 if (connect_requested_) { 236 if (connect_requested_) {
251 CallChannels(&TransportChannelImpl::MaybeStartGathering); 237 CallChannels(&TransportChannelImpl::MaybeStartGathering);
252 } 238 }
253 } 239 }
254 240
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 // negotiation happens. 394 // negotiation happens.
409 for (const auto& kv : channels_) { 395 for (const auto& kv : channels_) {
410 if (!ApplyNegotiatedTransportDescription(kv.second, error_desc)) { 396 if (!ApplyNegotiatedTransportDescription(kv.second, error_desc)) {
411 return false; 397 return false;
412 } 398 }
413 } 399 }
414 return true; 400 return true;
415 } 401 }
416 402
417 } // namespace cricket 403 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/p2p/base/faketransportcontroller.h ('k') | webrtc/p2p/base/transport_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698