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

Unified Diff: net/quic/test_tools/mock_crypto_client_stream.cc

Issue 23279011: Require handshake confirmation until a QUIC connection is created succesfully when using a new netw… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added test Created 7 years, 4 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
Index: net/quic/test_tools/mock_crypto_client_stream.cc
diff --git a/net/quic/test_tools/mock_crypto_client_stream.cc b/net/quic/test_tools/mock_crypto_client_stream.cc
index 79c335317144862d20d68bd646a8b7f84d7cb835..bfeb06f06292d450b6e52133dac61be187a183d6 100644
--- a/net/quic/test_tools/mock_crypto_client_stream.cc
+++ b/net/quic/test_tools/mock_crypto_client_stream.cc
@@ -51,6 +51,16 @@ bool MockCryptoClientStream::CryptoConnect() {
return true;
}
+void MockCryptoClientStream::SendOnCryptoHandshakeEvent(
+ QuicSession::CryptoHandshakeEvent event) {
ramant (doing other things) 2013/08/19 18:39:05 overly nit: consider adding a "DCHECK_NE(event, CO
Ryan Hamilton 2013/08/19 18:51:18 I like the idea, but COLD_START is one of the hans
+ encryption_established_ = true;
+ if (event == QuicSession::HANDSHAKE_CONFIRMED) {
+ handshake_confirmed_ = true;
+ SetConfigNegotiated();
+ }
+ session()->OnCryptoHandshakeEvent(event);
+}
+
void MockCryptoClientStream::SetConfigNegotiated() {
ASSERT_FALSE(session()->config()->negotiated());
QuicTagVector cgst;

Powered by Google App Engine
This is Rietveld 408576698