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

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

Issue 471613002: Change how QUIC negotiates pacing from congestion feedback to QUIC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Add_max_bandwidth_max_bandwidth_timestamp_73055131
Patch Set: Created 6 years, 4 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
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 <string.h> 7 #include <string.h>
8 #include <sys/types.h> 8 #include <sys/types.h>
9 #include <algorithm> 9 #include <algorithm>
10 #include <iterator> 10 #include <iterator>
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 sent_packet_manager_( 230 sent_packet_manager_(
231 is_server, clock_, &stats_, kCubic, 231 is_server, clock_, &stats_, kCubic,
232 FLAGS_quic_use_time_loss_detection ? kTime : kNack), 232 FLAGS_quic_use_time_loss_detection ? kTime : kNack),
233 version_negotiation_state_(START_NEGOTIATION), 233 version_negotiation_state_(START_NEGOTIATION),
234 is_server_(is_server), 234 is_server_(is_server),
235 connected_(true), 235 connected_(true),
236 peer_ip_changed_(false), 236 peer_ip_changed_(false),
237 peer_port_changed_(false), 237 peer_port_changed_(false),
238 self_ip_changed_(false), 238 self_ip_changed_(false),
239 self_port_changed_(false) { 239 self_port_changed_(false) {
240 #if 0
241 // TODO(rtenneti): Should we enable this code in chromium?
ramant (doing other things) 2014/08/13 16:12:02 Hi Ryan and Ian, Do we need this code in chromiu
Ryan Hamilton 2014/08/13 16:33:40 Hm. Good question. I think we can probably leave t
ramant (doing other things) 2014/08/14 02:45:48 Acknowledged.
240 if (!is_server_) { 242 if (!is_server_) {
241 // Pacing will be enabled if the client negotiates it. 243 // Pacing will be enabled if the client negotiates it.
242 sent_packet_manager_.MaybeEnablePacing(); 244 sent_packet_manager_.MaybeEnablePacing();
243 } 245 }
246 #endif
244 DVLOG(1) << ENDPOINT << "Created connection with connection_id: " 247 DVLOG(1) << ENDPOINT << "Created connection with connection_id: "
245 << connection_id; 248 << connection_id;
246 timeout_alarm_->Set(clock_->ApproximateNow().Add(idle_network_timeout_)); 249 timeout_alarm_->Set(clock_->ApproximateNow().Add(idle_network_timeout_));
247 framer_.set_visitor(this); 250 framer_.set_visitor(this);
248 framer_.set_received_entropy_calculator(&received_packet_manager_); 251 framer_.set_received_entropy_calculator(&received_packet_manager_);
249 stats_.connection_creation_time = clock_->ApproximateNow(); 252 stats_.connection_creation_time = clock_->ApproximateNow();
250 sent_packet_manager_.set_network_change_visitor(&packet_generator_); 253 sent_packet_manager_.set_network_change_visitor(&packet_generator_);
251 } 254 }
252 255
253 QuicConnection::~QuicConnection() { 256 QuicConnection::~QuicConnection() {
(...skipping 1737 matching lines...) Expand 10 before | Expand all | Expand 10 after
1991 // If we changed the generator's batch state, restore original batch state. 1994 // If we changed the generator's batch state, restore original batch state.
1992 if (!already_in_batch_mode_) { 1995 if (!already_in_batch_mode_) {
1993 DVLOG(1) << "Leaving Batch Mode."; 1996 DVLOG(1) << "Leaving Batch Mode.";
1994 connection_->packet_generator_.FinishBatchOperations(); 1997 connection_->packet_generator_.FinishBatchOperations();
1995 } 1998 }
1996 DCHECK_EQ(already_in_batch_mode_, 1999 DCHECK_EQ(already_in_batch_mode_,
1997 connection_->packet_generator_.InBatchMode()); 2000 connection_->packet_generator_.InBatchMode());
1998 } 2001 }
1999 2002
2000 } // namespace net 2003 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698