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

Side by Side Diff: net/quic/core/quic_connection.cc

Issue 2322233004: Landing Recent QUIC changes until Sun Sep 4 03:41:00 (Closed)
Patch Set: Remove simulation files from the build. Created 4 years, 3 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 | « net/quic/core/quic_client_promised_info_test.cc ('k') | net/quic/core/quic_connection_test.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 // 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 "net/quic/core/quic_connection.h" 5 #include "net/quic/core/quic_connection.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 #include <sys/types.h> 8 #include <sys/types.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1747 matching lines...) Expand 10 before | Expand all | Expand 10 after
1758 return true; 1758 return true;
1759 } 1759 }
1760 1760
1761 if (result.status == WRITE_STATUS_ERROR) { 1761 if (result.status == WRITE_STATUS_ERROR) {
1762 OnWriteError(result.error_code); 1762 OnWriteError(result.error_code);
1763 DLOG(ERROR) << ENDPOINT << "failed writing " << encrypted_length 1763 DLOG(ERROR) << ENDPOINT << "failed writing " << encrypted_length
1764 << " bytes " 1764 << " bytes "
1765 << " from host " << (self_address().address().empty() 1765 << " from host " << (self_address().address().empty()
1766 ? " empty address " 1766 ? " empty address "
1767 : self_address().ToStringWithoutPort()) 1767 : self_address().ToStringWithoutPort())
1768 << " to address " << peer_address().ToString(); 1768 << " to address " << peer_address().ToString()
1769 << " with error code " << result.error_code;
1769 return false; 1770 return false;
1770 } 1771 }
1771 1772
1772 return true; 1773 return true;
1773 } 1774 }
1774 1775
1775 bool QuicConnection::ShouldDiscardPacket(const SerializedPacket& packet) { 1776 bool QuicConnection::ShouldDiscardPacket(const SerializedPacket& packet) {
1776 if (!connected_) { 1777 if (!connected_) {
1777 DVLOG(1) << ENDPOINT << "Not sending packet as connection is disconnected."; 1778 DVLOG(1) << ENDPOINT << "Not sending packet as connection is disconnected.";
1778 return true; 1779 return true;
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
2580 2581
2581 void QuicConnection::CheckIfApplicationLimited() { 2582 void QuicConnection::CheckIfApplicationLimited() {
2582 if (queued_packets_.empty() && 2583 if (queued_packets_.empty() &&
2583 !sent_packet_manager_->HasPendingRetransmissions() && 2584 !sent_packet_manager_->HasPendingRetransmissions() &&
2584 !visitor_->WillingAndAbleToWrite()) { 2585 !visitor_->WillingAndAbleToWrite()) {
2585 sent_packet_manager_->OnApplicationLimited(); 2586 sent_packet_manager_->OnApplicationLimited();
2586 } 2587 }
2587 } 2588 }
2588 2589
2589 } // namespace net 2590 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_client_promised_info_test.cc ('k') | net/quic/core/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698