Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2015 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2015 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 194 channels_.insert(channels_.end(), RefCountedChannel(channel))->AddRef(); | 194 channels_.insert(channels_.end(), RefCountedChannel(channel))->AddRef(); |
| 195 // Adding a channel could cause aggregate state to change. | 195 // Adding a channel could cause aggregate state to change. |
| 196 UpdateAggregateStates_n(); | 196 UpdateAggregateStates_n(); |
| 197 return channel; | 197 return channel; |
| 198 } | 198 } |
| 199 | 199 |
| 200 void TransportController::DestroyTransportChannel_n( | 200 void TransportController::DestroyTransportChannel_n( |
| 201 const std::string& transport_name, | 201 const std::string& transport_name, |
| 202 int component) { | 202 int component) { |
| 203 RTC_DCHECK(network_thread_->IsCurrent()); | 203 RTC_DCHECK(network_thread_->IsCurrent()); |
| 204 | |
|
Zhi Huang
2016/08/01 05:12:28
I will fix these.
| |
| 205 auto it = FindChannel_n(transport_name, component); | 204 auto it = FindChannel_n(transport_name, component); |
| 206 if (it == channels_.end()) { | 205 if (it == channels_.end()) { |
| 207 LOG(LS_WARNING) << "Attempting to delete " << transport_name | 206 LOG(LS_WARNING) << "Attempting to delete " << transport_name |
| 208 << " TransportChannel " << component | 207 << " TransportChannel " << component |
| 209 << ", which doesn't exist."; | 208 << ", which doesn't exist."; |
| 210 return; | 209 return; |
| 211 } | 210 } |
| 212 | 211 |
| 213 it->DecRef(); | 212 it->DecRef(); |
| 214 if (it->ref() > 0) { | 213 if (it->ref() > 0) { |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 302 } | 301 } |
| 303 | 302 |
| 304 Transport* TransportController::GetOrCreateTransport_n( | 303 Transport* TransportController::GetOrCreateTransport_n( |
| 305 const std::string& transport_name) { | 304 const std::string& transport_name) { |
| 306 RTC_DCHECK(network_thread_->IsCurrent()); | 305 RTC_DCHECK(network_thread_->IsCurrent()); |
| 307 | 306 |
| 308 Transport* transport = GetTransport_n(transport_name); | 307 Transport* transport = GetTransport_n(transport_name); |
| 309 if (transport) { | 308 if (transport) { |
| 310 return transport; | 309 return transport; |
| 311 } | 310 } |
| 312 | |
| 313 transport = CreateTransport_n(transport_name); | 311 transport = CreateTransport_n(transport_name); |
| 314 // The stuff below happens outside of CreateTransport_w so that unit tests | 312 // The stuff below happens outside of CreateTransport_w so that unit tests |
| 315 // can override CreateTransport_w to return a different type of transport. | 313 // can override CreateTransport_w to return a different type of transport. |
| 316 transport->SetSslMaxProtocolVersion(ssl_max_version_); | 314 transport->SetSslMaxProtocolVersion(ssl_max_version_); |
| 317 transport->SetIceConfig(ice_config_); | 315 transport->SetIceConfig(ice_config_); |
| 318 transport->SetIceRole(ice_role_); | 316 transport->SetIceRole(ice_role_); |
| 319 transport->SetIceTiebreaker(ice_tiebreaker_); | 317 transport->SetIceTiebreaker(ice_tiebreaker_); |
| 320 if (certificate_) { | 318 if (certificate_) { |
| 321 transport->SetLocalCertificate(certificate_); | 319 transport->SetLocalCertificate(certificate_); |
| 322 } | 320 } |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 679 } | 677 } |
| 680 if (gathering_state_ != new_gathering_state) { | 678 if (gathering_state_ != new_gathering_state) { |
| 681 gathering_state_ = new_gathering_state; | 679 gathering_state_ = new_gathering_state; |
| 682 signaling_thread_->Post( | 680 signaling_thread_->Post( |
| 683 RTC_FROM_HERE, this, MSG_ICEGATHERINGSTATE, | 681 RTC_FROM_HERE, this, MSG_ICEGATHERINGSTATE, |
| 684 new rtc::TypedMessageData<IceGatheringState>(new_gathering_state)); | 682 new rtc::TypedMessageData<IceGatheringState>(new_gathering_state)); |
| 685 } | 683 } |
| 686 } | 684 } |
| 687 | 685 |
| 688 } // namespace cricket | 686 } // namespace cricket |
| OLD | NEW |