Chromium Code Reviews| Index: net/quic/quic_client_session.cc |
| diff --git a/net/quic/quic_client_session.cc b/net/quic/quic_client_session.cc |
| index e5fdba734e838e5c9b84f7925176f96a31eca2df..22caaf701c16730b537b23c806f7bdc1e8c48362 100644 |
| --- a/net/quic/quic_client_session.cc |
| +++ b/net/quic/quic_client_session.cc |
| @@ -171,6 +171,7 @@ QuicClientSession::QuicClientSession( |
| server_info_(server_info.Pass()), |
| read_pending_(false), |
| num_total_streams_(0), |
| + number_of_handshakes_(0), |
| task_runner_(task_runner), |
| net_log_(BoundNetLog::Make(net_log, NetLog::SOURCE_QUIC_SESSION)), |
| dns_resolution_end_time_(dns_resolution_end_time), |
| @@ -536,6 +537,10 @@ int QuicClientSession::GetNumSentClientHellos() const { |
| return crypto_stream_->num_sent_client_hellos(); |
| } |
| +int QuicClientSession::PacketLossRate() const { |
| + return logger_->PacketLossRate(); |
| +} |
| + |
| bool QuicClientSession::CanPool(const std::string& hostname, |
| PrivacyMode privacy_mode) const { |
| DCHECK(connection()->connected()); |
| @@ -620,7 +625,13 @@ void QuicClientSession::OnCryptoHandshakeEvent(CryptoHandshakeEvent event) { |
| "Net.QuicServerInfo.WaitForDataReady.HandshakeConfirmedTime", |
| base::TimeTicks::Now() - wait_for_data_start_time); |
| } |
| + |
| + // TODO(rtenneti): Handle ERROR condition from OnCryptoHandshakeCompleted. |
| + ++number_of_handshakes_; |
|
Ryan Hamilton
2015/03/21 00:04:46
I'm not sure that I understand what this member do
ramant (doing other things)
2015/03/21 03:46:05
Done.
|
| + stream_factory_->OnCryptoHandshakeCompleted(this, server_id_, |
| + number_of_handshakes_); |
| } |
| + |
| // Track how long it has taken to finish handshake after we have finished |
| // DNS host resolution. |
| if (!dns_resolution_end_time_.is_null()) { |
| @@ -946,6 +957,9 @@ void QuicClientSession::OnConnectTimeout() { |
| if (IsCryptoHandshakeConfirmed()) |
| return; |
| + ++number_of_handshakes_; |
| + stream_factory_->OnCryptoHandshakeCompleted(this, server_id_, |
| + number_of_handshakes_); |
| // TODO(rch): re-enable this code once beta is cut. |
| // if (stream_factory_) |
| // stream_factory_->OnSessionConnectTimeout(this); |