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

Unified Diff: net/quic/quic_crypto_server_stream.cc

Issue 1413613016: Factoring a QuicCryptoServerStreamBase API out of QuicCryptoServerStream (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@106845547
Patch Set: Created 5 years, 1 month 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_crypto_server_stream.h ('k') | net/quic/quic_crypto_server_stream_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_crypto_server_stream.cc
diff --git a/net/quic/quic_crypto_server_stream.cc b/net/quic/quic_crypto_server_stream.cc
index 30ba1585704067694ffea6dae2a71a5d963cf9d5..8e2e15a448212fa01b1421dcb68798a38692c08e 100644
--- a/net/quic/quic_crypto_server_stream.cc
+++ b/net/quic/quic_crypto_server_stream.cc
@@ -32,7 +32,7 @@ void ServerHelloNotifier::OnPacketRetransmitted(int /*retransmitted_bytes*/) {}
QuicCryptoServerStream::QuicCryptoServerStream(
const QuicCryptoServerConfig* crypto_config,
QuicSession* session)
- : QuicCryptoStream(session),
+ : QuicCryptoServerStreamBase(session),
crypto_config_(crypto_config),
validate_client_hello_cb_(nullptr),
num_handshake_messages_(0),
@@ -57,7 +57,7 @@ void QuicCryptoServerStream::CancelOutstandingCallbacks() {
void QuicCryptoServerStream::OnHandshakeMessage(
const CryptoHandshakeMessage& message) {
- QuicCryptoStream::OnHandshakeMessage(message);
+ QuicCryptoServerStreamBase::OnHandshakeMessage(message);
++num_handshake_messages_;
// Do not process handshake messages after the handshake is confirmed.
@@ -110,8 +110,8 @@ void QuicCryptoServerStream::FinishProcessingHandshakeMessage(
if (reply.tag() != kSHLO) {
if (reply.tag() == kSREJ) {
- DCHECK(use_stateless_rejects_if_peer_supported());
- DCHECK(peer_supports_stateless_rejects());
+ DCHECK(use_stateless_rejects_if_peer_supported_);
+ DCHECK(peer_supports_stateless_rejects_);
// Before sending the SREJ, cause the connection to save crypto packets
// so that they can be added to the time wait list manager and
// retransmitted.
@@ -120,8 +120,8 @@ void QuicCryptoServerStream::FinishProcessingHandshakeMessage(
SendHandshakeMessage(reply);
if (reply.tag() == kSREJ) {
- DCHECK(use_stateless_rejects_if_peer_supported());
- DCHECK(peer_supports_stateless_rejects());
+ DCHECK(use_stateless_rejects_if_peer_supported_);
+ DCHECK(peer_supports_stateless_rejects_);
DCHECK(!handshake_confirmed());
DVLOG(1) << "Closing connection "
<< session()->connection()->connection_id()
@@ -212,7 +212,37 @@ void QuicCryptoServerStream::OnServerHelloAcked() {
session()->connection()->OnHandshakeComplete();
}
-void QuicCryptoServerStream::set_previous_cached_network_params(
+uint8 QuicCryptoServerStream::NumHandshakeMessages() const {
+ return num_handshake_messages_;
+}
+
+uint8 QuicCryptoServerStream::NumHandshakeMessagesWithServerNonces() const {
+ return num_handshake_messages_with_server_nonces_;
+}
+
+int QuicCryptoServerStream::NumServerConfigUpdateMessagesSent() const {
+ return num_server_config_update_messages_sent_;
+}
+
+const CachedNetworkParameters*
+QuicCryptoServerStream::PreviousCachedNetworkParams() const {
+ return previous_cached_network_params_.get();
+}
+
+bool QuicCryptoServerStream::UseStatelessRejectsIfPeerSupported() const {
+ return use_stateless_rejects_if_peer_supported_;
+}
+
+bool QuicCryptoServerStream::PeerSupportsStatelessRejects() const {
+ return peer_supports_stateless_rejects_;
+}
+
+void QuicCryptoServerStream::SetPeerSupportsStatelessRejects(
+ bool peer_supports_stateless_rejects) {
+ peer_supports_stateless_rejects_ = peer_supports_stateless_rejects;
+}
+
+void QuicCryptoServerStream::SetPreviousCachedNetworkParams(
CachedNetworkParameters cached_network_params) {
previous_cached_network_params_.reset(
new CachedNetworkParameters(cached_network_params));
@@ -282,11 +312,6 @@ QuicErrorCode QuicCryptoServerStream::ProcessClientHello(
void QuicCryptoServerStream::OverrideQuicConfigDefaults(QuicConfig* config) {
}
-const CachedNetworkParameters*
-QuicCryptoServerStream::previous_cached_network_params() const {
- return previous_cached_network_params_.get();
-}
-
QuicCryptoServerStream::ValidateCallback::ValidateCallback(
QuicCryptoServerStream* parent) : parent_(parent) {
}
« no previous file with comments | « net/quic/quic_crypto_server_stream.h ('k') | net/quic/quic_crypto_server_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698