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

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

Issue 242593002: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Build fix. Use uint32 instead of int Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_ack_notifier_test.cc ('k') | net/quic/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/quic_connection.h" 5 #include "net/quic/quic_connection.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 #include <sys/types.h> 8 #include <sys/types.h>
9 #include <algorithm> 9 #include <algorithm>
10 #include <iterator> 10 #include <iterator>
(...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after
978 } 978 }
979 979
980 return consumed_data; 980 return consumed_data;
981 } 981 }
982 982
983 void QuicConnection::SendRstStream(QuicStreamId id, 983 void QuicConnection::SendRstStream(QuicStreamId id,
984 QuicRstStreamErrorCode error, 984 QuicRstStreamErrorCode error,
985 QuicStreamOffset bytes_written) { 985 QuicStreamOffset bytes_written) {
986 // Opportunistically bundle an ack with this outgoing packet. 986 // Opportunistically bundle an ack with this outgoing packet.
987 ScopedPacketBundler ack_bundler(this, BUNDLE_PENDING_ACK); 987 ScopedPacketBundler ack_bundler(this, BUNDLE_PENDING_ACK);
988 packet_generator_.AddControlFrame( 988 packet_generator_.AddControlFrame(QuicFrame(new QuicRstStreamFrame(
989 QuicFrame(new QuicRstStreamFrame(id, error, bytes_written))); 989 id, AdjustErrorForVersion(error, version()), bytes_written)));
990 } 990 }
991 991
992 void QuicConnection::SendWindowUpdate(QuicStreamId id, 992 void QuicConnection::SendWindowUpdate(QuicStreamId id,
993 QuicStreamOffset byte_offset) { 993 QuicStreamOffset byte_offset) {
994 // Opportunistically bundle an ack with this outgoing packet. 994 // Opportunistically bundle an ack with this outgoing packet.
995 ScopedPacketBundler ack_bundler(this, BUNDLE_PENDING_ACK); 995 ScopedPacketBundler ack_bundler(this, BUNDLE_PENDING_ACK);
996 packet_generator_.AddControlFrame( 996 packet_generator_.AddControlFrame(
997 QuicFrame(new QuicWindowUpdateFrame(id, byte_offset))); 997 QuicFrame(new QuicWindowUpdateFrame(id, byte_offset)));
998 } 998 }
999 999
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
1827 // If we changed the generator's batch state, restore original batch state. 1827 // If we changed the generator's batch state, restore original batch state.
1828 if (!already_in_batch_mode_) { 1828 if (!already_in_batch_mode_) {
1829 DVLOG(1) << "Leaving Batch Mode."; 1829 DVLOG(1) << "Leaving Batch Mode.";
1830 connection_->packet_generator_.FinishBatchOperations(); 1830 connection_->packet_generator_.FinishBatchOperations();
1831 } 1831 }
1832 DCHECK_EQ(already_in_batch_mode_, 1832 DCHECK_EQ(already_in_batch_mode_,
1833 connection_->packet_generator_.InBatchMode()); 1833 connection_->packet_generator_.InBatchMode());
1834 } 1834 }
1835 1835
1836 } // namespace net 1836 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_ack_notifier_test.cc ('k') | net/quic/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698