| 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 "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "net/quic/crypto/proof_verifier.h" | 10 #include "net/quic/crypto/proof_verifier.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 80 |
| 81 void OnConnectionClosed(QuicErrorCode error, bool from_peer) override { | 81 void OnConnectionClosed(QuicErrorCode error, bool from_peer) override { |
| 82 session_->OnConnectionClosed(error, from_peer); | 82 session_->OnConnectionClosed(error, from_peer); |
| 83 // The session will go away, so don't bother with cleanup. | 83 // The session will go away, so don't bother with cleanup. |
| 84 } | 84 } |
| 85 | 85 |
| 86 void OnWriteBlocked() override { session_->OnWriteBlocked(); } | 86 void OnWriteBlocked() override { session_->OnWriteBlocked(); } |
| 87 | 87 |
| 88 void OnConnectionMigration() override { session_->OnConnectionMigration(); } | 88 void OnConnectionMigration() override { session_->OnConnectionMigration(); } |
| 89 | 89 |
| 90 void MaybeMigrateConnection() override { session_->MaybeMigrateConnection(); } |
| 91 |
| 90 bool WillingAndAbleToWrite() const override { | 92 bool WillingAndAbleToWrite() const override { |
| 91 return session_->WillingAndAbleToWrite(); | 93 return session_->WillingAndAbleToWrite(); |
| 92 } | 94 } |
| 93 | 95 |
| 94 bool HasPendingHandshake() const override { | 96 bool HasPendingHandshake() const override { |
| 95 return session_->HasPendingHandshake(); | 97 return session_->HasPendingHandshake(); |
| 96 } | 98 } |
| 97 | 99 |
| 98 bool HasOpenDynamicStreams() const override { | 100 bool HasOpenDynamicStreams() const override { |
| 99 return session_->HasOpenDynamicStreams(); | 101 return session_->HasOpenDynamicStreams(); |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 if (dynamic_stream_map_.find(id) != dynamic_stream_map_.end()) { | 200 if (dynamic_stream_map_.find(id) != dynamic_stream_map_.end()) { |
| 199 QUIC_BUG << ENDPOINT << "Stream failed to close under OnConnectionClosed"; | 201 QUIC_BUG << ENDPOINT << "Stream failed to close under OnConnectionClosed"; |
| 200 CloseStream(id); | 202 CloseStream(id); |
| 201 } | 203 } |
| 202 } | 204 } |
| 203 } | 205 } |
| 204 | 206 |
| 205 void QuicSession::OnSuccessfulVersionNegotiation( | 207 void QuicSession::OnSuccessfulVersionNegotiation( |
| 206 const QuicVersion& /*version*/) {} | 208 const QuicVersion& /*version*/) {} |
| 207 | 209 |
| 210 void QuicSession::MaybeMigrateConnection() {} |
| 211 |
| 208 void QuicSession::OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame) { | 212 void QuicSession::OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame) { |
| 209 // Stream may be closed by the time we receive a WINDOW_UPDATE, so we can't | 213 // Stream may be closed by the time we receive a WINDOW_UPDATE, so we can't |
| 210 // assume that it still exists. | 214 // assume that it still exists. |
| 211 QuicStreamId stream_id = frame.stream_id; | 215 QuicStreamId stream_id = frame.stream_id; |
| 212 if (stream_id == kConnectionLevelId) { | 216 if (stream_id == kConnectionLevelId) { |
| 213 // This is a window update that applies to the connection, rather than an | 217 // This is a window update that applies to the connection, rather than an |
| 214 // individual stream. | 218 // individual stream. |
| 215 DVLOG(1) << ENDPOINT << "Received connection level flow control window " | 219 DVLOG(1) << ENDPOINT << "Received connection level flow control window " |
| 216 "update with byte offset: " | 220 "update with byte offset: " |
| 217 << frame.byte_offset; | 221 << frame.byte_offset; |
| (...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 880 } | 884 } |
| 881 } | 885 } |
| 882 return false; | 886 return false; |
| 883 } | 887 } |
| 884 | 888 |
| 885 bool QuicSession::IsIncomingStream(QuicStreamId id) const { | 889 bool QuicSession::IsIncomingStream(QuicStreamId id) const { |
| 886 return id % 2 != next_outgoing_stream_id_ % 2; | 890 return id % 2 != next_outgoing_stream_id_ % 2; |
| 887 } | 891 } |
| 888 | 892 |
| 889 } // namespace net | 893 } // namespace net |
| OLD | NEW |