| OLD | NEW |
| 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 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 } | 653 } |
| 654 | 654 |
| 655 void QuicConfig::SetDefaults() { | 655 void QuicConfig::SetDefaults() { |
| 656 QuicTagVector congestion_feedback; | 656 QuicTagVector congestion_feedback; |
| 657 congestion_feedback.push_back(kQBIC); | 657 congestion_feedback.push_back(kQBIC); |
| 658 congestion_feedback_.set(congestion_feedback, kQBIC); | 658 congestion_feedback_.set(congestion_feedback, kQBIC); |
| 659 idle_connection_state_lifetime_seconds_.set(kDefaultTimeoutSecs, | 659 idle_connection_state_lifetime_seconds_.set(kDefaultTimeoutSecs, |
| 660 kDefaultInitialTimeoutSecs); | 660 kDefaultInitialTimeoutSecs); |
| 661 // kKATO is optional. Return 0 if not negotiated. | 661 // kKATO is optional. Return 0 if not negotiated. |
| 662 keepalive_timeout_seconds_.set(0, 0); | 662 keepalive_timeout_seconds_.set(0, 0); |
| 663 max_streams_per_connection_.set(kDefaultMaxStreamsPerConnection, | 663 set_max_streams_per_connection(kDefaultMaxStreamsPerConnection, |
| 664 kDefaultMaxStreamsPerConnection); | 664 kDefaultMaxStreamsPerConnection); |
| 665 max_time_before_crypto_handshake_ = QuicTime::Delta::FromSeconds( | 665 max_time_before_crypto_handshake_ = QuicTime::Delta::FromSeconds( |
| 666 kDefaultMaxTimeForCryptoHandshakeSecs); | 666 kDefaultMaxTimeForCryptoHandshakeSecs); |
| 667 | 667 |
| 668 SetInitialFlowControlWindowToSend(kDefaultFlowControlSendWindow); | 668 SetInitialFlowControlWindowToSend(kDefaultFlowControlSendWindow); |
| 669 SetInitialStreamFlowControlWindowToSend(kDefaultFlowControlSendWindow); | 669 SetInitialStreamFlowControlWindowToSend(kDefaultFlowControlSendWindow); |
| 670 SetInitialSessionFlowControlWindowToSend(kDefaultFlowControlSendWindow); | 670 SetInitialSessionFlowControlWindowToSend(kDefaultFlowControlSendWindow); |
| 671 } | 671 } |
| 672 | 672 |
| 673 void QuicConfig::ToHandshakeMessage(CryptoHandshakeMessage* out) const { | 673 void QuicConfig::ToHandshakeMessage(CryptoHandshakeMessage* out) const { |
| 674 congestion_feedback_.ToHandshakeMessage(out); | 674 congestion_feedback_.ToHandshakeMessage(out); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 737 peer_hello, hello_type, error_details); | 737 peer_hello, hello_type, error_details); |
| 738 } | 738 } |
| 739 if (error == QUIC_NO_ERROR) { | 739 if (error == QUIC_NO_ERROR) { |
| 740 error = connection_options_.ProcessPeerHello( | 740 error = connection_options_.ProcessPeerHello( |
| 741 peer_hello, hello_type, error_details); | 741 peer_hello, hello_type, error_details); |
| 742 } | 742 } |
| 743 return error; | 743 return error; |
| 744 } | 744 } |
| 745 | 745 |
| 746 } // namespace net | 746 } // namespace net |
| OLD | NEW |