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

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

Issue 23587004: If the stream is being closed locally (for example in the case of a (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests Created 7 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_client_session.cc ('k') | net/quic/quic_http_stream.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 <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 packet_generator_.ConsumeData(id, data, offset, fin); 807 packet_generator_.ConsumeData(id, data, offset, fin);
808 if (crypto_frame_while_batch_mode) { 808 if (crypto_frame_while_batch_mode) {
809 // Restore batch mode. 809 // Restore batch mode.
810 packet_generator_.StartBatchOperations(); 810 packet_generator_.StartBatchOperations();
811 } 811 }
812 return consumed_data; 812 return consumed_data;
813 } 813 }
814 814
815 void QuicConnection::SendRstStream(QuicStreamId id, 815 void QuicConnection::SendRstStream(QuicStreamId id,
816 QuicRstStreamErrorCode error) { 816 QuicRstStreamErrorCode error) {
817 LOG(INFO) << "Sending RST_STREAM: " << id << " code: " << error;
817 packet_generator_.AddControlFrame( 818 packet_generator_.AddControlFrame(
818 QuicFrame(new QuicRstStreamFrame(id, error))); 819 QuicFrame(new QuicRstStreamFrame(id, error)));
819 } 820 }
820 821
821 const QuicConnectionStats& QuicConnection::GetStats() { 822 const QuicConnectionStats& QuicConnection::GetStats() {
822 // Update rtt and estimated bandwidth. 823 // Update rtt and estimated bandwidth.
823 stats_.rtt = congestion_manager_.SmoothedRtt().ToMicroseconds(); 824 stats_.rtt = congestion_manager_.SmoothedRtt().ToMicroseconds();
824 stats_.estimated_bandwidth = 825 stats_.estimated_bandwidth =
825 congestion_manager_.BandwidthEstimate().ToBytesPerSecond(); 826 congestion_manager_.BandwidthEstimate().ToBytesPerSecond();
826 return stats_; 827 return stats_;
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after
1719 timeout = connection_timeout; 1720 timeout = connection_timeout;
1720 } 1721 }
1721 } 1722 }
1722 1723
1723 timeout_alarm_->Cancel(); 1724 timeout_alarm_->Cancel();
1724 timeout_alarm_->Set(clock_->ApproximateNow().Add(timeout)); 1725 timeout_alarm_->Set(clock_->ApproximateNow().Add(timeout));
1725 return false; 1726 return false;
1726 } 1727 }
1727 1728
1728 } // namespace net 1729 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_client_session.cc ('k') | net/quic/quic_http_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698