Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(607)

Unified Diff: net/quic/quic_session.cc

Issue 15074007: Land Recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix for windows Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_session.h ('k') | net/quic/quic_session_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_session.cc
diff --git a/net/quic/quic_session.cc b/net/quic/quic_session.cc
index 6687930011c0ef21603128186c40140861fc16b2..5d5df18929c4b540fcad7436f1be331d187ddec5 100644
--- a/net/quic/quic_session.cc
+++ b/net/quic/quic_session.cc
@@ -64,9 +64,12 @@ class VisitorShim : public QuicConnectionVisitorInterface {
QuicSession* session_;
};
-QuicSession::QuicSession(QuicConnection* connection, bool is_server)
+QuicSession::QuicSession(QuicConnection* connection,
+ const QuicConfig& config,
+ bool is_server)
: connection_(connection),
visitor_shim_(new VisitorShim(this)),
+ config_(config),
max_open_streams_(kDefaultMaxStreamsPerConnection),
next_stream_id_(is_server ? 2 : 3),
is_server_(is_server),
@@ -214,11 +217,17 @@ bool QuicSession::IsCryptoHandshakeConfirmed() {
void QuicSession::OnCryptoHandshakeEvent(CryptoHandshakeEvent event) {
if (event == QuicSession::HANDSHAKE_CONFIRMED) {
- connection_->SetConnectionTimeout(
- GetCryptoStream()->negotiated_params().idle_connection_state_lifetime);
+ LOG_IF(DFATAL, !config_.negotiated())
+ << "Handshake confirmed without parameter negotiation.";
+ connection_->SetConnectionTimeout(config_.idle_connection_state_lifetime());
+ max_open_streams_ = config_.max_streams_per_connection();
}
}
+QuicConfig* QuicSession::config() {
+ return &config_;
+}
+
void QuicSession::ActivateStream(ReliableQuicStream* stream) {
DLOG(INFO) << "num_streams: " << stream_map_.size()
<< ". activating " << stream->id();
« no previous file with comments | « net/quic/quic_session.h ('k') | net/quic/quic_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698