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

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

Issue 2828223002: Delete method MessageQueue::set_socketserver (Closed)
Patch Set: Use unique_ptr, fixing one leak in VirtualSocketServerTest. Created 3 years, 7 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
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 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 void Connection::Prune() { 1141 void Connection::Prune() {
1142 if (!pruned_ || active()) { 1142 if (!pruned_ || active()) {
1143 LOG_J(LS_INFO, this) << "Connection pruned"; 1143 LOG_J(LS_INFO, this) << "Connection pruned";
1144 pruned_ = true; 1144 pruned_ = true;
1145 requests_.Clear(); 1145 requests_.Clear();
1146 set_write_state(STATE_WRITE_TIMEOUT); 1146 set_write_state(STATE_WRITE_TIMEOUT);
1147 } 1147 }
1148 } 1148 }
1149 1149
1150 void Connection::Destroy() { 1150 void Connection::Destroy() {
1151 // TODO(deadbeef, nisse): This may leak if an application closes a
1152 // PeerConnection and then quickly destroys the PeerConnectionFactory (along
1153 // with the networking thread on which this message is posted). Also affects
1154 // tests, with a workaround in
1155 // AutoSocketServerThread::~AutoSocketServerThread.
1151 LOG_J(LS_VERBOSE, this) << "Connection destroyed"; 1156 LOG_J(LS_VERBOSE, this) << "Connection destroyed";
1152 port_->thread()->Post(RTC_FROM_HERE, this, MSG_DELETE); 1157 port_->thread()->Post(RTC_FROM_HERE, this, MSG_DELETE);
1153 } 1158 }
1154 1159
1155 void Connection::FailAndDestroy() { 1160 void Connection::FailAndDestroy() {
1156 set_state(IceCandidatePairState::FAILED); 1161 set_state(IceCandidatePairState::FAILED);
1157 Destroy(); 1162 Destroy();
1158 } 1163 }
1159 1164
1160 void Connection::FailAndPrune() { 1165 void Connection::FailAndPrune() {
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
1625 RTC_DCHECK(sent < 0); 1630 RTC_DCHECK(sent < 0);
1626 error_ = port_->GetError(); 1631 error_ = port_->GetError();
1627 stats_.sent_discarded_packets++; 1632 stats_.sent_discarded_packets++;
1628 } else { 1633 } else {
1629 send_rate_tracker_.AddSamples(sent); 1634 send_rate_tracker_.AddSamples(sent);
1630 } 1635 }
1631 return sent; 1636 return sent;
1632 } 1637 }
1633 1638
1634 } // namespace cricket 1639 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698