Remove redundant handshake confirmed method.

Handshake information can be fetched directly from the crypto stream, and thus we don't need a separate member variable to cache it.

gfe-relnote: no behavior change. Not protected.
PiperOrigin-RevId: 275355012
Change-Id: If571bddf5946eb99b801a6b43f62c54e116e54ec
diff --git a/quic/core/http/quic_spdy_session.cc b/quic/core/http/quic_spdy_session.cc
index 5e4c9b6..474dc0b 100644
--- a/quic/core/http/quic_spdy_session.cc
+++ b/quic/core/http/quic_spdy_session.cc
@@ -1049,7 +1049,7 @@
   }
 
   DCHECK(perspective() == Perspective::IS_CLIENT);
-  if (IsHandshakeConfirmed()) {
+  if (IsCryptoHandshakeConfirmed()) {
     SendMaxPushId();
     send_control_stream_->SendMaxPushIdFrame(max_allowed_push_id_);
   }
diff --git a/quic/core/quic_session.cc b/quic/core/quic_session.cc
index e27cc31..d0b9a84 100644
--- a/quic/core/quic_session.cc
+++ b/quic/core/quic_session.cc
@@ -87,7 +87,6 @@
           perspective() == Perspective::IS_SERVER,
           nullptr),
       currently_writing_stream_id_(0),
-      is_handshake_confirmed_(false),
       goaway_sent_(false),
       goaway_received_(false),
       control_frame_manager_(this),
@@ -935,10 +934,6 @@
 }
 
 bool QuicSession::IsEncryptionEstablished() const {
-  // Once the handshake is confirmed, it never becomes un-confirmed.
-  if (is_handshake_confirmed_) {
-    return true;
-  }
   return GetCryptoStream()->encryption_established();
 }
 
@@ -1264,7 +1259,6 @@
       // Discard originally encrypted packets, since they can't be decrypted by
       // the peer.
       NeuterUnencryptedData();
-      is_handshake_confirmed_ = true;
       break;
 
     default:
diff --git a/quic/core/quic_session.h b/quic/core/quic_session.h
index 23f1031..4af037a 100644
--- a/quic/core/quic_session.h
+++ b/quic/core/quic_session.h
@@ -597,8 +597,6 @@
     return false;
   }
 
-  bool IsHandshakeConfirmed() const { return is_handshake_confirmed_; }
-
   // Return the largest peer created stream id depending on directionality
   // indicated by |unidirectional|.
   QuicStreamId GetLargestPeerCreatedStreamId(bool unidirectional) const;
@@ -737,9 +735,6 @@
   // call stack of OnCanWrite.
   QuicStreamId currently_writing_stream_id_;
 
-  // Cached value of whether the crypto handshake has been confirmed.
-  bool is_handshake_confirmed_;
-
   // Whether a GoAway has been sent.
   bool goaway_sent_;