| 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 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 } | 477 } |
| 478 | 478 |
| 479 QuicTagVector QuicConfig::SendConnectionOptions() const { | 479 QuicTagVector QuicConfig::SendConnectionOptions() const { |
| 480 return connection_options_.GetSendValues(); | 480 return connection_options_.GetSendValues(); |
| 481 } | 481 } |
| 482 | 482 |
| 483 void QuicConfig::SetIdleConnectionStateLifetime( | 483 void QuicConfig::SetIdleConnectionStateLifetime( |
| 484 QuicTime::Delta max_idle_connection_state_lifetime, | 484 QuicTime::Delta max_idle_connection_state_lifetime, |
| 485 QuicTime::Delta default_idle_conection_state_lifetime) { | 485 QuicTime::Delta default_idle_conection_state_lifetime) { |
| 486 idle_connection_state_lifetime_seconds_.set( | 486 idle_connection_state_lifetime_seconds_.set( |
| 487 max_idle_connection_state_lifetime.ToSeconds(), | 487 static_cast<uint32>(max_idle_connection_state_lifetime.ToSeconds()), |
| 488 default_idle_conection_state_lifetime.ToSeconds()); | 488 static_cast<uint32>(default_idle_conection_state_lifetime.ToSeconds())); |
| 489 } | 489 } |
| 490 | 490 |
| 491 QuicTime::Delta QuicConfig::IdleConnectionStateLifetime() const { | 491 QuicTime::Delta QuicConfig::IdleConnectionStateLifetime() const { |
| 492 return QuicTime::Delta::FromSeconds( | 492 return QuicTime::Delta::FromSeconds( |
| 493 idle_connection_state_lifetime_seconds_.GetUint32()); | 493 idle_connection_state_lifetime_seconds_.GetUint32()); |
| 494 } | 494 } |
| 495 | 495 |
| 496 QuicTime::Delta QuicConfig::KeepaliveTimeout() const { | 496 QuicTime::Delta QuicConfig::KeepaliveTimeout() const { |
| 497 return QuicTime::Delta::FromSeconds( | 497 return QuicTime::Delta::FromSeconds( |
| 498 keepalive_timeout_seconds_.GetUint32()); | 498 keepalive_timeout_seconds_.GetUint32()); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 516 } | 516 } |
| 517 | 517 |
| 518 bool QuicConfig::HasReceivedBytesForConnectionId() const { | 518 bool QuicConfig::HasReceivedBytesForConnectionId() const { |
| 519 return bytes_for_connection_id_.HasReceivedValue(); | 519 return bytes_for_connection_id_.HasReceivedValue(); |
| 520 } | 520 } |
| 521 | 521 |
| 522 uint32 QuicConfig::ReceivedBytesForConnectionId() const { | 522 uint32 QuicConfig::ReceivedBytesForConnectionId() const { |
| 523 return bytes_for_connection_id_.GetReceivedValue(); | 523 return bytes_for_connection_id_.GetReceivedValue(); |
| 524 } | 524 } |
| 525 | 525 |
| 526 void QuicConfig::SetInitialRoundTripTimeUsToSend(size_t rtt) { | 526 void QuicConfig::SetInitialRoundTripTimeUsToSend(uint32 rtt) { |
| 527 initial_round_trip_time_us_.SetSendValue(rtt); | 527 initial_round_trip_time_us_.SetSendValue(rtt); |
| 528 } | 528 } |
| 529 | 529 |
| 530 bool QuicConfig::HasReceivedInitialRoundTripTimeUs() const { | 530 bool QuicConfig::HasReceivedInitialRoundTripTimeUs() const { |
| 531 return initial_round_trip_time_us_.HasReceivedValue(); | 531 return initial_round_trip_time_us_.HasReceivedValue(); |
| 532 } | 532 } |
| 533 | 533 |
| 534 uint32 QuicConfig::ReceivedInitialRoundTripTimeUs() const { | 534 uint32 QuicConfig::ReceivedInitialRoundTripTimeUs() const { |
| 535 return initial_round_trip_time_us_.GetReceivedValue(); | 535 return initial_round_trip_time_us_.GetReceivedValue(); |
| 536 } | 536 } |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 peer_hello, hello_type, error_details); | 718 peer_hello, hello_type, error_details); |
| 719 } | 719 } |
| 720 if (error == QUIC_NO_ERROR) { | 720 if (error == QUIC_NO_ERROR) { |
| 721 error = connection_options_.ProcessPeerHello( | 721 error = connection_options_.ProcessPeerHello( |
| 722 peer_hello, hello_type, error_details); | 722 peer_hello, hello_type, error_details); |
| 723 } | 723 } |
| 724 return error; | 724 return error; |
| 725 } | 725 } |
| 726 | 726 |
| 727 } // namespace net | 727 } // namespace net |
| OLD | NEW |