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

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

Issue 2115033002: Adds QUIC_VERSION_36 which adds support to force HOL blocking between streams for measurement purpo… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@126085461
Patch Set: typo Created 4 years, 5 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/quic/quic_config.h ('k') | net/quic/quic_flags.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_config.h" 5 #include "net/quic/quic_config.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "net/quic/crypto/crypto_handshake_message.h" 10 #include "net/quic/crypto/crypto_handshake_message.h"
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 silent_close_(kSCLS, PRESENCE_OPTIONAL), 410 silent_close_(kSCLS, PRESENCE_OPTIONAL),
411 max_streams_per_connection_(kMSPC, PRESENCE_OPTIONAL), 411 max_streams_per_connection_(kMSPC, PRESENCE_OPTIONAL),
412 max_incoming_dynamic_streams_(kMIDS, PRESENCE_OPTIONAL), 412 max_incoming_dynamic_streams_(kMIDS, PRESENCE_OPTIONAL),
413 bytes_for_connection_id_(kTCID, PRESENCE_OPTIONAL), 413 bytes_for_connection_id_(kTCID, PRESENCE_OPTIONAL),
414 initial_round_trip_time_us_(kIRTT, PRESENCE_OPTIONAL), 414 initial_round_trip_time_us_(kIRTT, PRESENCE_OPTIONAL),
415 initial_stream_flow_control_window_bytes_(kSFCW, PRESENCE_OPTIONAL), 415 initial_stream_flow_control_window_bytes_(kSFCW, PRESENCE_OPTIONAL),
416 initial_session_flow_control_window_bytes_(kCFCW, PRESENCE_OPTIONAL), 416 initial_session_flow_control_window_bytes_(kCFCW, PRESENCE_OPTIONAL),
417 socket_receive_buffer_(kSRBF, PRESENCE_OPTIONAL), 417 socket_receive_buffer_(kSRBF, PRESENCE_OPTIONAL),
418 multipath_enabled_(kMPTH, PRESENCE_OPTIONAL), 418 multipath_enabled_(kMPTH, PRESENCE_OPTIONAL),
419 connection_migration_disabled_(kNCMR, PRESENCE_OPTIONAL), 419 connection_migration_disabled_(kNCMR, PRESENCE_OPTIONAL),
420 alternate_server_address_(kASAD, PRESENCE_OPTIONAL) { 420 alternate_server_address_(kASAD, PRESENCE_OPTIONAL),
421 force_hol_blocking_(kFHOL, PRESENCE_OPTIONAL) {
421 SetDefaults(); 422 SetDefaults();
422 } 423 }
423 424
424 QuicConfig::QuicConfig(const QuicConfig& other) = default; 425 QuicConfig::QuicConfig(const QuicConfig& other) = default;
425 426
426 QuicConfig::~QuicConfig() {} 427 QuicConfig::~QuicConfig() {}
427 428
428 bool QuicConfig::SetInitialReceivedConnectionOptions( 429 bool QuicConfig::SetInitialReceivedConnectionOptions(
429 const QuicTagVector& tags) { 430 const QuicTagVector& tags) {
430 if (HasReceivedConnectionOptions()) { 431 if (HasReceivedConnectionOptions()) {
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 } 637 }
637 638
638 bool QuicConfig::HasReceivedAlternateServerAddress() const { 639 bool QuicConfig::HasReceivedAlternateServerAddress() const {
639 return alternate_server_address_.HasReceivedValue(); 640 return alternate_server_address_.HasReceivedValue();
640 } 641 }
641 642
642 const IPEndPoint& QuicConfig::ReceivedAlternateServerAddress() const { 643 const IPEndPoint& QuicConfig::ReceivedAlternateServerAddress() const {
643 return alternate_server_address_.GetReceivedValue(); 644 return alternate_server_address_.GetReceivedValue();
644 } 645 }
645 646
647 void QuicConfig::SetForceHolBlocking() {
648 force_hol_blocking_.SetSendValue(1);
649 }
650
651 bool QuicConfig::ForceHolBlocking(Perspective perspective) const {
652 if (perspective == Perspective::IS_SERVER) {
653 return force_hol_blocking_.HasReceivedValue();
654 } else {
655 return force_hol_blocking_.HasSendValue();
656 }
657 }
658
646 bool QuicConfig::negotiated() const { 659 bool QuicConfig::negotiated() const {
647 // TODO(ianswett): Add the negotiated parameters once and iterate over all 660 // TODO(ianswett): Add the negotiated parameters once and iterate over all
648 // of them in negotiated, ToHandshakeMessage, ProcessClientHello, and 661 // of them in negotiated, ToHandshakeMessage, ProcessClientHello, and
649 // ProcessServerHello. 662 // ProcessServerHello.
650 return idle_connection_state_lifetime_seconds_.negotiated() && 663 return idle_connection_state_lifetime_seconds_.negotiated() &&
651 max_streams_per_connection_.negotiated(); 664 max_streams_per_connection_.negotiated();
652 } 665 }
653 666
654 void QuicConfig::SetDefaults() { 667 void QuicConfig::SetDefaults() {
655 idle_connection_state_lifetime_seconds_.set(kMaximumIdleTimeoutSecs, 668 idle_connection_state_lifetime_seconds_.set(kMaximumIdleTimeoutSecs,
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 error_details); 748 error_details);
736 } 749 }
737 if (error == QUIC_NO_ERROR) { 750 if (error == QUIC_NO_ERROR) {
738 error = alternate_server_address_.ProcessPeerHello(peer_hello, hello_type, 751 error = alternate_server_address_.ProcessPeerHello(peer_hello, hello_type,
739 error_details); 752 error_details);
740 } 753 }
741 return error; 754 return error;
742 } 755 }
743 756
744 } // namespace net 757 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_config.h ('k') | net/quic/quic_flags.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698