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

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

Issue 157803007: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win_x64 compiler error fix Created 6 years, 10 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/reliable_quic_stream.h ('k') | net/quic/test_tools/quic_sent_packet_manager_peer.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/reliable_quic_stream.h" 5 #include "net/quic/reliable_quic_stream.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "net/quic/quic_session.h" 8 #include "net/quic/quic_session.h"
9 #include "net/quic/quic_spdy_decompressor.h" 9 #include "net/quic/quic_spdy_decompressor.h"
10 #include "net/quic/quic_write_blocked_list.h" 10 #include "net/quic/quic_write_blocked_list.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 return true; 65 return true;
66 } 66 }
67 // Note: This count include duplicate data received. 67 // Note: This count include duplicate data received.
68 stream_bytes_read_ += frame.data.TotalBufferSize(); 68 stream_bytes_read_ += frame.data.TotalBufferSize();
69 69
70 bool accepted = sequencer_.OnStreamFrame(frame); 70 bool accepted = sequencer_.OnStreamFrame(frame);
71 71
72 return accepted; 72 return accepted;
73 } 73 }
74 74
75 void ReliableQuicStream::OnStreamReset(QuicRstStreamErrorCode error) { 75 void ReliableQuicStream::OnStreamReset(const QuicRstStreamFrame& frame) {
76 stream_error_ = error; 76 stream_error_ = frame.error_code;
77 CloseWriteSide(); 77 CloseWriteSide();
78 CloseReadSide(); 78 CloseReadSide();
79 } 79 }
80 80
81 void ReliableQuicStream::OnConnectionClosed(QuicErrorCode error, 81 void ReliableQuicStream::OnConnectionClosed(QuicErrorCode error,
82 bool from_peer) { 82 bool from_peer) {
83 if (read_side_closed_ && write_side_closed_) { 83 if (read_side_closed_ && write_side_closed_) {
84 return; 84 return;
85 } 85 }
86 if (error != QUIC_NO_ERROR) { 86 if (error != QUIC_NO_ERROR) {
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 bool ReliableQuicStream::HasBufferedData() { 224 bool ReliableQuicStream::HasBufferedData() {
225 return !queued_data_.empty(); 225 return !queued_data_.empty();
226 } 226 }
227 227
228 void ReliableQuicStream::OnClose() { 228 void ReliableQuicStream::OnClose() {
229 CloseReadSide(); 229 CloseReadSide();
230 CloseWriteSide(); 230 CloseWriteSide();
231 } 231 }
232 232
233 } // namespace net 233 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/reliable_quic_stream.h ('k') | net/quic/test_tools/quic_sent_packet_manager_peer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698