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

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

Issue 217053010: Revert of Rename PrivateMode enum values: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_stream_factory_test.cc ('k') | net/socket/client_socket_pool_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/crypto_test_utils.h" 5 #include "net/quic/test_tools/crypto_test_utils.h"
6 6
7 #include "net/quic/crypto/channel_id.h" 7 #include "net/quic/crypto/channel_id.h"
8 #include "net/quic/crypto/common_cert_set.h" 8 #include "net/quic/crypto/common_cert_set.h"
9 #include "net/quic/crypto/crypto_handshake.h" 9 #include "net/quic/crypto/crypto_handshake.h"
10 #include "net/quic/crypto/quic_crypto_server_config.h" 10 #include "net/quic/crypto/quic_crypto_server_config.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 client_session.config()->SetDefaults(); 173 client_session.config()->SetDefaults();
174 crypto_config.SetDefaults(); 174 crypto_config.SetDefaults();
175 // TODO(rtenneti): Enable testing of ProofVerifier. 175 // TODO(rtenneti): Enable testing of ProofVerifier.
176 // if (!options.dont_verify_certs) { 176 // if (!options.dont_verify_certs) {
177 // crypto_config.SetProofVerifier(ProofVerifierForTesting()); 177 // crypto_config.SetProofVerifier(ProofVerifierForTesting());
178 // } 178 // }
179 if (options.channel_id_enabled) { 179 if (options.channel_id_enabled) {
180 crypto_config.SetChannelIDSigner(ChannelIDSignerForTesting()); 180 crypto_config.SetChannelIDSigner(ChannelIDSignerForTesting());
181 } 181 }
182 QuicSessionKey server_key(kServerHostname, kServerPort, false, 182 QuicSessionKey server_key(kServerHostname, kServerPort, false,
183 PRIVACY_MODE_DISABLED); 183 kPrivacyModeDisabled);
184 QuicCryptoClientStream client(server_key, &client_session, NULL, 184 QuicCryptoClientStream client(server_key, &client_session, NULL,
185 &crypto_config); 185 &crypto_config);
186 client_session.SetCryptoStream(&client); 186 client_session.SetCryptoStream(&client);
187 187
188 CHECK(client.CryptoConnect()); 188 CHECK(client.CryptoConnect());
189 CHECK_EQ(1u, client_conn->packets_.size()); 189 CHECK_EQ(1u, client_conn->packets_.size());
190 190
191 CommunicateHandshakeMessages(client_conn, &client, server_conn, server); 191 CommunicateHandshakeMessages(client_conn, &client, server_conn, server);
192 192
193 CompareClientAndServerKeys(&client, server); 193 CompareClientAndServerKeys(&client, server);
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 scoped_ptr<QuicData> bytes(CryptoFramer::ConstructHandshakeMessage(msg)); 518 scoped_ptr<QuicData> bytes(CryptoFramer::ConstructHandshakeMessage(msg));
519 scoped_ptr<CryptoHandshakeMessage> parsed( 519 scoped_ptr<CryptoHandshakeMessage> parsed(
520 CryptoFramer::ParseMessage(bytes->AsStringPiece())); 520 CryptoFramer::ParseMessage(bytes->AsStringPiece()));
521 CHECK(parsed.get()); 521 CHECK(parsed.get());
522 522
523 return *parsed; 523 return *parsed;
524 } 524 }
525 525
526 } // namespace test 526 } // namespace test
527 } // namespace net 527 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_stream_factory_test.cc ('k') | net/socket/client_socket_pool_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698