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

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

Issue 2019423006: Adding more detail to MessageQueue::Dispatch logging. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 6 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 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 AddressMap::iterator iter = 661 AddressMap::iterator iter =
662 connections_.find(conn->remote_candidate().address()); 662 connections_.find(conn->remote_candidate().address());
663 ASSERT(iter != connections_.end()); 663 ASSERT(iter != connections_.end());
664 connections_.erase(iter); 664 connections_.erase(iter);
665 665
666 // On the controlled side, ports time out after all connections fail. 666 // On the controlled side, ports time out after all connections fail.
667 // Note: If a new connection is added after this message is posted, but it 667 // Note: If a new connection is added after this message is posted, but it
668 // fails and is removed before kPortTimeoutDelay, then this message will 668 // fails and is removed before kPortTimeoutDelay, then this message will
669 // still cause the Port to be destroyed. 669 // still cause the Port to be destroyed.
670 if (dead()) { 670 if (dead()) {
671 thread_->PostDelayed(timeout_delay_, this, MSG_DEAD); 671 thread_->PostDelayed(FROM_HERE, timeout_delay_, this, MSG_DEAD);
672 } 672 }
673 } 673 }
674 674
675 void Port::Destroy() { 675 void Port::Destroy() {
676 ASSERT(connections_.empty()); 676 ASSERT(connections_.empty());
677 LOG_J(LS_INFO, this) << "Port deleted"; 677 LOG_J(LS_INFO, this) << "Port deleted";
678 SignalDestroyed(this); 678 SignalDestroyed(this);
679 delete this; 679 delete this;
680 } 680 }
681 681
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
1020 if (!pruned_ || active()) { 1020 if (!pruned_ || active()) {
1021 LOG_J(LS_VERBOSE, this) << "Connection pruned"; 1021 LOG_J(LS_VERBOSE, this) << "Connection pruned";
1022 pruned_ = true; 1022 pruned_ = true;
1023 requests_.Clear(); 1023 requests_.Clear();
1024 set_write_state(STATE_WRITE_TIMEOUT); 1024 set_write_state(STATE_WRITE_TIMEOUT);
1025 } 1025 }
1026 } 1026 }
1027 1027
1028 void Connection::Destroy() { 1028 void Connection::Destroy() {
1029 LOG_J(LS_VERBOSE, this) << "Connection destroyed"; 1029 LOG_J(LS_VERBOSE, this) << "Connection destroyed";
1030 port_->thread()->Post(this, MSG_DELETE); 1030 port_->thread()->Post(FROM_HERE, this, MSG_DELETE);
1031 } 1031 }
1032 1032
1033 void Connection::FailAndDestroy() { 1033 void Connection::FailAndDestroy() {
1034 set_state(Connection::STATE_FAILED); 1034 set_state(Connection::STATE_FAILED);
1035 Destroy(); 1035 Destroy();
1036 } 1036 }
1037 1037
1038 void Connection::PrintPingsSinceLastResponse(std::string* s, size_t max) { 1038 void Connection::PrintPingsSinceLastResponse(std::string* s, size_t max) {
1039 std::ostringstream oss; 1039 std::ostringstream oss;
1040 oss << std::boolalpha; 1040 oss << std::boolalpha;
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
1462 ASSERT(sent < 0); 1462 ASSERT(sent < 0);
1463 error_ = port_->GetError(); 1463 error_ = port_->GetError();
1464 sent_packets_discarded_++; 1464 sent_packets_discarded_++;
1465 } else { 1465 } else {
1466 send_rate_tracker_.AddSamples(sent); 1466 send_rate_tracker_.AddSamples(sent);
1467 } 1467 }
1468 return sent; 1468 return sent;
1469 } 1469 }
1470 1470
1471 } // namespace cricket 1471 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698