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

Unified Diff: net/quic/core/quic_session.cc

Issue 2823223003: Rename QuicSession::GetCryptoStream() to GetMutableCryptoStream(). Add a const GetCryptoStream(). M… (Closed)
Patch Set: Created 3 years, 8 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/core/quic_session.h ('k') | net/quic/core/quic_session_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_session.cc
diff --git a/net/quic/core/quic_session.cc b/net/quic/core/quic_session.cc
index dba6c46b25c5e382a541af587ff1829e66c7e457..28d256bc30b77480fbf4f390702de54164f21dab 100644
--- a/net/quic/core/quic_session.cc
+++ b/net/quic/core/quic_session.cc
@@ -50,8 +50,8 @@ void QuicSession::Initialize() {
connection_->set_visitor(this);
connection_->SetFromConfig(config_);
- DCHECK_EQ(kCryptoStreamId, GetCryptoStream()->id());
- static_stream_map_[kCryptoStreamId] = GetCryptoStream();
+ DCHECK_EQ(kCryptoStreamId, GetMutableCryptoStream()->id());
+ static_stream_map_[kCryptoStreamId] = GetMutableCryptoStream();
}
QuicSession::~QuicSession() {
@@ -295,7 +295,7 @@ QuicConsumedData QuicSession::WritevData(
// it might end up resulting in unencrypted stream data being sent.
// While this is impossible to avoid given sufficient corruption, this
// seems like a reasonable mitigation.
- if (id == kCryptoStreamId && stream != GetCryptoStream()) {
+ if (id == kCryptoStreamId && stream != GetMutableCryptoStream()) {
QUIC_BUG << "Stream id mismatch";
connection_->CloseConnection(
QUIC_INTERNAL_ERROR,
@@ -425,11 +425,11 @@ void QuicSession::UpdateFlowControlOnFinalReceivedByteOffset(
}
}
-bool QuicSession::IsEncryptionEstablished() {
+bool QuicSession::IsEncryptionEstablished() const {
return GetCryptoStream()->encryption_established();
}
-bool QuicSession::IsCryptoHandshakeConfirmed() {
+bool QuicSession::IsCryptoHandshakeConfirmed() const {
return GetCryptoStream()->handshake_confirmed();
}
« no previous file with comments | « net/quic/core/quic_session.h ('k') | net/quic/core/quic_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698