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_session.h" | 5 #include "net/quic/quic_session.h" |
6 | 6 |
7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
8 #include "net/quic/quic_connection.h" | 8 #include "net/quic/quic_connection.h" |
9 | 9 |
10 using base::StringPiece; | 10 using base::StringPiece; |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 | 206 |
207 bool QuicSession::IsEncryptionEstablished() { | 207 bool QuicSession::IsEncryptionEstablished() { |
208 return GetCryptoStream()->encryption_established(); | 208 return GetCryptoStream()->encryption_established(); |
209 } | 209 } |
210 | 210 |
211 bool QuicSession::IsCryptoHandshakeConfirmed() { | 211 bool QuicSession::IsCryptoHandshakeConfirmed() { |
212 return GetCryptoStream()->handshake_confirmed(); | 212 return GetCryptoStream()->handshake_confirmed(); |
213 } | 213 } |
214 | 214 |
215 void QuicSession::OnCryptoHandshakeEvent(CryptoHandshakeEvent event) { | 215 void QuicSession::OnCryptoHandshakeEvent(CryptoHandshakeEvent event) { |
| 216 if (event == QuicSession::HANDSHAKE_CONFIRMED) { |
| 217 connection_->SetConnectionTimeout( |
| 218 GetCryptoStream()->negotiated_params().idle_connection_state_lifetime); |
| 219 } |
216 } | 220 } |
217 | 221 |
218 void QuicSession::ActivateStream(ReliableQuicStream* stream) { | 222 void QuicSession::ActivateStream(ReliableQuicStream* stream) { |
219 DLOG(INFO) << "num_streams: " << stream_map_.size() | 223 DLOG(INFO) << "num_streams: " << stream_map_.size() |
220 << ". activating " << stream->id(); | 224 << ". activating " << stream->id(); |
221 DCHECK(stream_map_.count(stream->id()) == 0); | 225 DCHECK(stream_map_.count(stream->id()) == 0); |
222 stream_map_[stream->id()] = stream; | 226 stream_map_[stream->id()] = stream; |
223 } | 227 } |
224 | 228 |
225 QuicStreamId QuicSession::GetNextStreamId() { | 229 QuicStreamId QuicSession::GetNextStreamId() { |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 QuicStreamId stream_id) { | 324 QuicStreamId stream_id) { |
321 decompression_blocked_streams_[header_id] = stream_id; | 325 decompression_blocked_streams_[header_id] = stream_id; |
322 } | 326 } |
323 | 327 |
324 void QuicSession::PostProcessAfterData() { | 328 void QuicSession::PostProcessAfterData() { |
325 STLDeleteElements(&closed_streams_); | 329 STLDeleteElements(&closed_streams_); |
326 closed_streams_.clear(); | 330 closed_streams_.clear(); |
327 } | 331 } |
328 | 332 |
329 } // namespace net | 333 } // namespace net |
OLD | NEW |