| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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/tools/quic/quic_client_base.h" | 5 #include "net/tools/quic/quic_client_base.h" |
| 6 | 6 |
| 7 #include "net/quic/crypto/quic_random.h" | 7 #include "net/quic/crypto/quic_random.h" |
| 8 #include "net/quic/quic_server_id.h" | 8 #include "net/quic/quic_server_id.h" |
| 9 | 9 |
| 10 namespace net { | 10 namespace net { |
| 11 | 11 |
| 12 QuicClientBase::QuicClientBase(const QuicServerId& server_id, | 12 QuicClientBase::QuicClientBase(const QuicServerId& server_id, |
| 13 const QuicVersionVector& supported_versions, | 13 const QuicVersionVector& supported_versions, |
| 14 const QuicConfig& config, | 14 const QuicConfig& config, |
| 15 QuicConnectionHelperInterface* helper, | 15 QuicConnectionHelperInterface* helper, |
| 16 QuicAlarmFactory* alarm_factory, |
| 16 ProofVerifier* proof_verifier) | 17 ProofVerifier* proof_verifier) |
| 17 : server_id_(server_id), | 18 : server_id_(server_id), |
| 18 config_(config), | 19 config_(config), |
| 19 crypto_config_(proof_verifier), | 20 crypto_config_(proof_verifier), |
| 20 helper_(helper), | 21 helper_(helper), |
| 22 alarm_factory_(alarm_factory), |
| 21 supported_versions_(supported_versions), | 23 supported_versions_(supported_versions), |
| 22 initial_max_packet_length_(0), | 24 initial_max_packet_length_(0), |
| 23 num_stateless_rejects_received_(0), | 25 num_stateless_rejects_received_(0), |
| 24 num_sent_client_hellos_(0), | 26 num_sent_client_hellos_(0), |
| 25 connection_error_(QUIC_NO_ERROR), | 27 connection_error_(QUIC_NO_ERROR), |
| 26 connected_or_attempting_connect_(false) {} | 28 connected_or_attempting_connect_(false) {} |
| 27 | 29 |
| 28 QuicClientBase::~QuicClientBase() {} | 30 QuicClientBase::~QuicClientBase() {} |
| 29 | 31 |
| 30 bool QuicClientBase::Initialize() { | 32 bool QuicClientBase::Initialize() { |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 return cached->has_server_designated_connection_id() | 144 return cached->has_server_designated_connection_id() |
| 143 ? cached->GetNextServerDesignatedConnectionId() | 145 ? cached->GetNextServerDesignatedConnectionId() |
| 144 : 0; | 146 : 0; |
| 145 } | 147 } |
| 146 | 148 |
| 147 QuicConnectionId QuicClientBase::GenerateNewConnectionId() { | 149 QuicConnectionId QuicClientBase::GenerateNewConnectionId() { |
| 148 return QuicRandom::GetInstance()->RandUint64(); | 150 return QuicRandom::GetInstance()->RandUint64(); |
| 149 } | 151 } |
| 150 | 152 |
| 151 } // namespace net | 153 } // namespace net |
| OLD | NEW |