| 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/crypto/proof_verifier.h" |
| 8 #include "net/quic/quic_connection.h" | 9 #include "net/quic/quic_connection.h" |
| 9 | 10 |
| 10 using base::StringPiece; | 11 using base::StringPiece; |
| 11 using base::hash_map; | 12 using base::hash_map; |
| 12 using base::hash_set; | 13 using base::hash_set; |
| 13 using std::vector; | 14 using std::vector; |
| 14 | 15 |
| 15 namespace net { | 16 namespace net { |
| 16 | 17 |
| 17 #define ENDPOINT (is_server_ ? "Server: " : " Client: ") | 18 #define ENDPOINT (is_server_ ? "Server: " : " Client: ") |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 config_.idle_connection_state_lifetime()); | 251 config_.idle_connection_state_lifetime()); |
| 251 connection_->SetOverallConnectionTimeout(QuicTime::Delta::Infinite()); | 252 connection_->SetOverallConnectionTimeout(QuicTime::Delta::Infinite()); |
| 252 max_open_streams_ = config_.max_streams_per_connection(); | 253 max_open_streams_ = config_.max_streams_per_connection(); |
| 253 break; | 254 break; |
| 254 | 255 |
| 255 default: | 256 default: |
| 256 LOG(ERROR) << ENDPOINT << "Got unknown handshake event: " << event; | 257 LOG(ERROR) << ENDPOINT << "Got unknown handshake event: " << event; |
| 257 } | 258 } |
| 258 } | 259 } |
| 259 | 260 |
| 261 // TODO(rtenneti): Don't port proof_verifier code back to google3 until we have |
| 262 // a way to have single ProofVerifier that can handle multiple requests. |
| 263 ProofVerifier* QuicSession::proof_verifier() const { |
| 264 return proof_verifier_.get(); |
| 265 } |
| 266 |
| 267 void QuicSession::SetProofVerifier(ProofVerifier* verifier) { |
| 268 proof_verifier_.reset(verifier); |
| 269 } |
| 270 |
| 260 QuicConfig* QuicSession::config() { | 271 QuicConfig* QuicSession::config() { |
| 261 return &config_; | 272 return &config_; |
| 262 } | 273 } |
| 263 | 274 |
| 264 void QuicSession::ActivateStream(ReliableQuicStream* stream) { | 275 void QuicSession::ActivateStream(ReliableQuicStream* stream) { |
| 265 DLOG(INFO) << ENDPOINT << "num_streams: " << stream_map_.size() | 276 DLOG(INFO) << ENDPOINT << "num_streams: " << stream_map_.size() |
| 266 << ". activating " << stream->id(); | 277 << ". activating " << stream->id(); |
| 267 DCHECK(stream_map_.count(stream->id()) == 0); | 278 DCHECK(stream_map_.count(stream->id()) == 0); |
| 268 stream_map_[stream->id()] = stream; | 279 stream_map_[stream->id()] = stream; |
| 269 } | 280 } |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 QuicStreamId stream_id) { | 377 QuicStreamId stream_id) { |
| 367 decompression_blocked_streams_[header_id] = stream_id; | 378 decompression_blocked_streams_[header_id] = stream_id; |
| 368 } | 379 } |
| 369 | 380 |
| 370 void QuicSession::PostProcessAfterData() { | 381 void QuicSession::PostProcessAfterData() { |
| 371 STLDeleteElements(&closed_streams_); | 382 STLDeleteElements(&closed_streams_); |
| 372 closed_streams_.clear(); | 383 closed_streams_.clear(); |
| 373 } | 384 } |
| 374 | 385 |
| 375 } // namespace net | 386 } // namespace net |
| OLD | NEW |