| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/renderer/p2p/ipc_socket_factory.h" | 5 #include "content/renderer/p2p/ipc_socket_factory.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <list> | 8 #include <list> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 CHECK(send_metrics.packet_id == 0 || | 602 CHECK(send_metrics.packet_id == 0 || |
| 603 record.packet_id == send_metrics.packet_id); | 603 record.packet_id == send_metrics.packet_id); |
| 604 | 604 |
| 605 send_bytes_available_ += record.packet_size; | 605 send_bytes_available_ += record.packet_size; |
| 606 | 606 |
| 607 DCHECK_LE(send_bytes_available_, kMaximumInFlightBytes); | 607 DCHECK_LE(send_bytes_available_, kMaximumInFlightBytes); |
| 608 | 608 |
| 609 in_flight_packet_records_.pop_front(); | 609 in_flight_packet_records_.pop_front(); |
| 610 TraceSendThrottlingState(); | 610 TraceSendThrottlingState(); |
| 611 | 611 |
| 612 SignalPacketSent(this, rtc::SentPacket(send_metrics.transport_sequence_number, |
| 613 send_metrics.send_time_ms)); |
| 614 |
| 612 if (writable_signal_expected_ && send_bytes_available_ > 0) { | 615 if (writable_signal_expected_ && send_bytes_available_ > 0) { |
| 613 WebRtcLogMessage(base::StringPrintf( | 616 WebRtcLogMessage(base::StringPrintf( |
| 614 "IpcPacketSocket: sending is unblocked. %d packets in flight.", | 617 "IpcPacketSocket: sending is unblocked. %d packets in flight.", |
| 615 static_cast<int>(in_flight_packet_records_.size()))); | 618 static_cast<int>(in_flight_packet_records_.size()))); |
| 616 | 619 |
| 617 SignalReadyToSend(this); | 620 SignalReadyToSend(this); |
| 618 writable_signal_expected_ = false; | 621 writable_signal_expected_ = false; |
| 619 } | 622 } |
| 620 } | 623 } |
| 621 | 624 |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 786 } | 789 } |
| 787 | 790 |
| 788 rtc::AsyncResolverInterface* | 791 rtc::AsyncResolverInterface* |
| 789 IpcPacketSocketFactory::CreateAsyncResolver() { | 792 IpcPacketSocketFactory::CreateAsyncResolver() { |
| 790 scoped_ptr<AsyncAddressResolverImpl> resolver( | 793 scoped_ptr<AsyncAddressResolverImpl> resolver( |
| 791 new AsyncAddressResolverImpl(socket_dispatcher_)); | 794 new AsyncAddressResolverImpl(socket_dispatcher_)); |
| 792 return resolver.release(); | 795 return resolver.release(); |
| 793 } | 796 } |
| 794 | 797 |
| 795 } // namespace content | 798 } // namespace content |
| OLD | NEW |