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/tools/quic/quic_server_session.cc

Issue 1014433002: Land Recent QUIC Changes until 03/09/2015. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@replaces_Perspective_enun_88006458
Patch Set: Rebase - added NET_EXPORT_PRIVATE to fix compiler error Created 5 years, 9 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 bandwidth_recorder.EstimateRecordedDuringSlowStart() 149 bandwidth_recorder.EstimateRecordedDuringSlowStart()
150 ? CachedNetworkParameters::SLOW_START 150 ? CachedNetworkParameters::SLOW_START
151 : CachedNetworkParameters::CONGESTION_AVOIDANCE); 151 : CachedNetworkParameters::CONGESTION_AVOIDANCE);
152 cached_network_params.set_timestamp( 152 cached_network_params.set_timestamp(
153 connection()->clock()->WallNow().ToUNIXSeconds()); 153 connection()->clock()->WallNow().ToUNIXSeconds());
154 if (!serving_region_.empty()) { 154 if (!serving_region_.empty()) {
155 cached_network_params.set_serving_region(serving_region_); 155 cached_network_params.set_serving_region(serving_region_);
156 } 156 }
157 157
158 crypto_stream_->SendServerConfigUpdate(&cached_network_params); 158 crypto_stream_->SendServerConfigUpdate(&cached_network_params);
159
160 connection()->OnSendConnectionState(cached_network_params);
161
159 last_scup_time_ = now; 162 last_scup_time_ = now;
160 last_scup_sequence_number_ = 163 last_scup_sequence_number_ =
161 connection()->sequence_number_of_last_sent_packet(); 164 connection()->sequence_number_of_last_sent_packet();
162 } 165 }
163 166
164 bool QuicServerSession::ShouldCreateIncomingDataStream(QuicStreamId id) { 167 bool QuicServerSession::ShouldCreateIncomingDataStream(QuicStreamId id) {
165 if (id % 2 == 0) { 168 if (id % 2 == 0) {
166 DVLOG(1) << "Invalid incoming even stream_id:" << id; 169 DVLOG(1) << "Invalid incoming even stream_id:" << id;
167 connection()->SendConnectionClose(QUIC_INVALID_STREAM_ID); 170 connection()->SendConnectionClose(QUIC_INVALID_STREAM_ID);
168 return false; 171 return false;
(...skipping 21 matching lines...) Expand all
190 DLOG(ERROR) << "Server push not yet supported"; 193 DLOG(ERROR) << "Server push not yet supported";
191 return nullptr; 194 return nullptr;
192 } 195 }
193 196
194 QuicCryptoServerStream* QuicServerSession::GetCryptoStream() { 197 QuicCryptoServerStream* QuicServerSession::GetCryptoStream() {
195 return crypto_stream_.get(); 198 return crypto_stream_.get();
196 } 199 }
197 200
198 } // namespace tools 201 } // namespace tools
199 } // namespace net 202 } // 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