| OLD | NEW |
| 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/core/quic_connection.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 #include <sys/types.h> | 8 #include <sys/types.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| 11 #include <iterator> | 11 #include <iterator> |
| 12 #include <limits> | 12 #include <limits> |
| 13 #include <memory> | 13 #include <memory> |
| 14 #include <set> | 14 #include <set> |
| 15 #include <utility> | 15 #include <utility> |
| 16 | 16 |
| 17 #include "base/format_macros.h" | 17 #include "base/format_macros.h" |
| 18 #include "base/logging.h" | 18 #include "base/logging.h" |
| 19 #include "base/macros.h" | 19 #include "base/macros.h" |
| 20 #include "base/memory/ref_counted.h" | 20 #include "base/memory/ref_counted.h" |
| 21 #include "base/metrics/histogram_macros.h" | 21 #include "base/metrics/histogram_macros.h" |
| 22 #include "base/stl_util.h" | 22 #include "base/stl_util.h" |
| 23 #include "base/strings/string_number_conversions.h" | 23 #include "base/strings/string_number_conversions.h" |
| 24 #include "base/strings/stringprintf.h" | 24 #include "base/strings/stringprintf.h" |
| 25 #include "net/base/address_family.h" | 25 #include "net/base/address_family.h" |
| 26 #include "net/base/ip_address.h" | 26 #include "net/base/ip_address.h" |
| 27 #include "net/base/net_errors.h" | 27 #include "net/base/net_errors.h" |
| 28 #include "net/quic/crypto/crypto_protocol.h" | 28 #include "net/quic/core/crypto/crypto_protocol.h" |
| 29 #include "net/quic/crypto/quic_decrypter.h" | 29 #include "net/quic/core/crypto/quic_decrypter.h" |
| 30 #include "net/quic/crypto/quic_encrypter.h" | 30 #include "net/quic/core/crypto/quic_encrypter.h" |
| 31 #include "net/quic/proto/cached_network_parameters.pb.h" | 31 #include "net/quic/core/proto/cached_network_parameters.pb.h" |
| 32 #include "net/quic/quic_bandwidth.h" | 32 #include "net/quic/core/quic_bandwidth.h" |
| 33 #include "net/quic/quic_bug_tracker.h" | 33 #include "net/quic/core/quic_bug_tracker.h" |
| 34 #include "net/quic/quic_config.h" | 34 #include "net/quic/core/quic_config.h" |
| 35 #include "net/quic/quic_flags.h" | 35 #include "net/quic/core/quic_flags.h" |
| 36 #include "net/quic/quic_packet_generator.h" | 36 #include "net/quic/core/quic_packet_generator.h" |
| 37 #include "net/quic/quic_sent_packet_manager.h" | 37 #include "net/quic/core/quic_sent_packet_manager.h" |
| 38 #include "net/quic/quic_utils.h" | 38 #include "net/quic/core/quic_utils.h" |
| 39 | 39 |
| 40 using base::StringPiece; | 40 using base::StringPiece; |
| 41 using base::StringPrintf; | 41 using base::StringPrintf; |
| 42 using std::list; | 42 using std::list; |
| 43 using std::make_pair; | 43 using std::make_pair; |
| 44 using std::max; | 44 using std::max; |
| 45 using std::min; | 45 using std::min; |
| 46 using std::numeric_limits; | 46 using std::numeric_limits; |
| 47 using std::set; | 47 using std::set; |
| 48 using std::string; | 48 using std::string; |
| (...skipping 2444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2493 // the sender and a signaling mechanism -- if the sender uses a | 2493 // the sender and a signaling mechanism -- if the sender uses a |
| 2494 // different MinRTO, we may get spurious retransmissions. May not have | 2494 // different MinRTO, we may get spurious retransmissions. May not have |
| 2495 // any benefits, but if the delayed ack becomes a significant source | 2495 // any benefits, but if the delayed ack becomes a significant source |
| 2496 // of (likely, tail) latency, then consider such a mechanism. | 2496 // of (likely, tail) latency, then consider such a mechanism. |
| 2497 const QuicTime::Delta QuicConnection::DelayedAckTime() { | 2497 const QuicTime::Delta QuicConnection::DelayedAckTime() { |
| 2498 return QuicTime::Delta::FromMilliseconds( | 2498 return QuicTime::Delta::FromMilliseconds( |
| 2499 min(kMaxDelayedAckTimeMs, kMinRetransmissionTimeMs / 2)); | 2499 min(kMaxDelayedAckTimeMs, kMinRetransmissionTimeMs / 2)); |
| 2500 } | 2500 } |
| 2501 | 2501 |
| 2502 } // namespace net | 2502 } // namespace net |
| OLD | NEW |