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

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

Issue 786123002: Update from https://crrev.com/307330 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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/quic_server_session.h ('k') | net/quic/quic_session.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_server_session.h" 5 #include "net/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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 void QuicServerSession::OnWriteBlocked() { 76 void QuicServerSession::OnWriteBlocked() {
77 QuicSession::OnWriteBlocked(); 77 QuicSession::OnWriteBlocked();
78 visitor_->OnWriteBlocked(connection()); 78 visitor_->OnWriteBlocked(connection());
79 } 79 }
80 80
81 void QuicServerSession::OnCongestionWindowChange(QuicTime now) { 81 void QuicServerSession::OnCongestionWindowChange(QuicTime now) {
82 if (connection()->version() <= QUIC_VERSION_21) { 82 if (connection()->version() <= QUIC_VERSION_21) {
83 return; 83 return;
84 } 84 }
85 85
86 // Only send updates when the application has no data to write.
87 if (HasDataToWrite()) {
88 return;
89 }
90
86 // If not enough time has passed since the last time we sent an update to the 91 // If not enough time has passed since the last time we sent an update to the
87 // client, or not enough packets have been sent, then return early. 92 // client, or not enough packets have been sent, then return early.
88 const QuicSentPacketManager& sent_packet_manager = 93 const QuicSentPacketManager& sent_packet_manager =
89 connection()->sent_packet_manager(); 94 connection()->sent_packet_manager();
90 int64 srtt_ms = 95 int64 srtt_ms =
91 sent_packet_manager.GetRttStats()->smoothed_rtt().ToMilliseconds(); 96 sent_packet_manager.GetRttStats()->smoothed_rtt().ToMilliseconds();
92 int64 now_ms = now.Subtract(last_scup_time_).ToMilliseconds(); 97 int64 now_ms = now.Subtract(last_scup_time_).ToMilliseconds();
93 int64 packets_since_last_scup = 98 int64 packets_since_last_scup =
94 connection()->sequence_number_of_last_sent_packet() - 99 connection()->sequence_number_of_last_sent_packet() -
95 last_scup_sequence_number_; 100 last_scup_sequence_number_;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 QuicDataStream* QuicServerSession::CreateOutgoingDataStream() { 192 QuicDataStream* QuicServerSession::CreateOutgoingDataStream() {
188 DLOG(ERROR) << "Server push not yet supported"; 193 DLOG(ERROR) << "Server push not yet supported";
189 return nullptr; 194 return nullptr;
190 } 195 }
191 196
192 QuicCryptoServerStream* QuicServerSession::GetCryptoStream() { 197 QuicCryptoServerStream* QuicServerSession::GetCryptoStream() {
193 return crypto_stream_.get(); 198 return crypto_stream_.get();
194 } 199 }
195 200
196 } // namespace net 201 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_server_session.h ('k') | net/quic/quic_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698