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

Side by Side Diff: net/tools/quic/quic_server_session.cc

Issue 849123003: Land Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed extra blank line Created 5 years, 11 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/tools/quic/end_to_end_test.cc ('k') | net/tools/quic/quic_server_session_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/tools/quic/quic_server_session.h" 5 #include "net/tools/quic/quic_server_session.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "net/quic/crypto/cached_network_parameters.h" 8 #include "net/quic/crypto/cached_network_parameters.h"
9 #include "net/quic/quic_connection.h" 9 #include "net/quic/quic_connection.h"
10 #include "net/quic/quic_flags.h" 10 #include "net/quic/quic_flags.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 } 73 }
74 visitor_->OnConnectionClosed(connection()->connection_id(), error); 74 visitor_->OnConnectionClosed(connection()->connection_id(), error);
75 } 75 }
76 76
77 void QuicServerSession::OnWriteBlocked() { 77 void QuicServerSession::OnWriteBlocked() {
78 QuicSession::OnWriteBlocked(); 78 QuicSession::OnWriteBlocked();
79 visitor_->OnWriteBlocked(connection()); 79 visitor_->OnWriteBlocked(connection());
80 } 80 }
81 81
82 void QuicServerSession::OnCongestionWindowChange(QuicTime now) { 82 void QuicServerSession::OnCongestionWindowChange(QuicTime now) {
83 if (connection()->version() <= QUIC_VERSION_21) {
84 return;
85 }
86
87 // Only send updates when the application has no data to write. 83 // Only send updates when the application has no data to write.
88 if (HasDataToWrite()) { 84 if (HasDataToWrite()) {
89 return; 85 return;
90 } 86 }
91 87
92 // If not enough time has passed since the last time we sent an update to the 88 // If not enough time has passed since the last time we sent an update to the
93 // client, or not enough packets have been sent, then return early. 89 // client, or not enough packets have been sent, then return early.
94 const QuicSentPacketManager& sent_packet_manager = 90 const QuicSentPacketManager& sent_packet_manager =
95 connection()->sent_packet_manager(); 91 connection()->sent_packet_manager();
96 int64 srtt_ms = 92 int64 srtt_ms =
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 DLOG(ERROR) << "Server push not yet supported"; 190 DLOG(ERROR) << "Server push not yet supported";
195 return nullptr; 191 return nullptr;
196 } 192 }
197 193
198 QuicCryptoServerStream* QuicServerSession::GetCryptoStream() { 194 QuicCryptoServerStream* QuicServerSession::GetCryptoStream() {
199 return crypto_stream_.get(); 195 return crypto_stream_.get();
200 } 196 }
201 197
202 } // namespace tools 198 } // namespace tools
203 } // namespace net 199 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/end_to_end_test.cc ('k') | net/tools/quic/quic_server_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698