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

Side by Side Diff: net/quic/test_tools/mock_crypto_client_stream.cc

Issue 192583004: QUIC - use QuicSessionKey tuple (host, port, is_https) instead of server_hostname (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with TOT Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/test_tools/mock_crypto_client_stream.h" 5 #include "net/quic/test_tools/mock_crypto_client_stream.h"
6
7 #include "net/quic/quic_session_key.h"
6 #include "net/ssl/ssl_info.h" 8 #include "net/ssl/ssl_info.h"
7 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
8 10
9 namespace net { 11 namespace net {
10 12
11 MockCryptoClientStream::MockCryptoClientStream( 13 MockCryptoClientStream::MockCryptoClientStream(
12 const string& server_hostname, 14 const QuicSessionKey& server_key,
13 QuicSession* session, 15 QuicSession* session,
14 QuicCryptoClientConfig* crypto_config, 16 QuicCryptoClientConfig* crypto_config,
15 HandshakeMode handshake_mode, 17 HandshakeMode handshake_mode,
16 const SSLInfo* ssl_info) 18 const SSLInfo* ssl_info)
17 : QuicCryptoClientStream(server_hostname, session, crypto_config), 19 : QuicCryptoClientStream(server_key, session, crypto_config),
18 handshake_mode_(handshake_mode), 20 handshake_mode_(handshake_mode),
19 ssl_info_(ssl_info) { 21 ssl_info_(ssl_info) {
20 } 22 }
21 23
22 MockCryptoClientStream::~MockCryptoClientStream() { 24 MockCryptoClientStream::~MockCryptoClientStream() {
23 } 25 }
24 26
25 void MockCryptoClientStream::OnHandshakeMessage( 27 void MockCryptoClientStream::OnHandshakeMessage(
26 const CryptoHandshakeMessage& message) { 28 const CryptoHandshakeMessage& message) {
27 CloseConnection(QUIC_CRYPTO_MESSAGE_AFTER_HANDSHAKE_COMPLETE); 29 CloseConnection(QUIC_CRYPTO_MESSAGE_AFTER_HANDSHAKE_COMPLETE);
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 CryptoHandshakeMessage msg; 90 CryptoHandshakeMessage msg;
89 session()->config()->ToHandshakeMessage(&msg); 91 session()->config()->ToHandshakeMessage(&msg);
90 string error_details; 92 string error_details;
91 const QuicErrorCode error = 93 const QuicErrorCode error =
92 session()->config()->ProcessClientHello(msg, &error_details); 94 session()->config()->ProcessClientHello(msg, &error_details);
93 ASSERT_EQ(QUIC_NO_ERROR, error); 95 ASSERT_EQ(QUIC_NO_ERROR, error);
94 ASSERT_TRUE(session()->config()->negotiated()); 96 ASSERT_TRUE(session()->config()->negotiated());
95 } 97 }
96 98
97 } // namespace net 99 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698