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

Side by Side Diff: net/tools/quic/test_tools/quic_test_client.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: use : instead of / as host, port separator 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) 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/tools/quic/test_tools/quic_test_client.h" 5 #include "net/tools/quic/test_tools/quic_test_client.h"
6 6
7 #include "base/time/time.h" 7 #include "base/time/time.h"
8 #include "net/base/completion_callback.h" 8 #include "net/base/completion_callback.h"
9 #include "net/base/net_errors.h" 9 #include "net/base/net_errors.h"
10 #include "net/cert/cert_verify_result.h" 10 #include "net/cert/cert_verify_result.h"
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 QuicClient* QuicTestClient::client() { return client_.get(); } 284 QuicClient* QuicTestClient::client() { return client_.get(); }
285 285
286 const string& QuicTestClient::cert_common_name() const { 286 const string& QuicTestClient::cert_common_name() const {
287 return reinterpret_cast<RecordingProofVerifier*>(proof_verifier_) 287 return reinterpret_cast<RecordingProofVerifier*>(proof_verifier_)
288 ->common_name(); 288 ->common_name();
289 } 289 }
290 290
291 QuicTagValueMap QuicTestClient::GetServerConfig() const { 291 QuicTagValueMap QuicTestClient::GetServerConfig() const {
292 net::QuicCryptoClientConfig* config = 292 net::QuicCryptoClientConfig* config =
293 QuicClientPeer::GetCryptoConfig(client_.get()); 293 QuicClientPeer::GetCryptoConfig(client_.get());
294 // Defaulting server port to 9999.
294 net::QuicCryptoClientConfig::CachedState* state = 295 net::QuicCryptoClientConfig::CachedState* state =
295 config->LookupOrCreate(client_->server_hostname()); 296 config->LookupOrCreate(client_->server_hostname(), 9999);
ramant (doing other things) 2014/03/10 20:31:46 We are not passing port for QuiTestClient and this
ramant (doing other things) 2014/03/11 00:48:50 Using the port from client's server_address.
296 const net::CryptoHandshakeMessage* handshake_msg = state->GetServerConfig(); 297 const net::CryptoHandshakeMessage* handshake_msg = state->GetServerConfig();
297 if (handshake_msg != NULL) { 298 if (handshake_msg != NULL) {
298 return handshake_msg->tag_value_map(); 299 return handshake_msg->tag_value_map();
299 } else { 300 } else {
300 return QuicTagValueMap(); 301 return QuicTagValueMap();
301 } 302 }
302 } 303 }
303 304
304 bool QuicTestClient::connected() const { 305 bool QuicTestClient::connected() const {
305 return client_->connected(); 306 return client_->connected();
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 456
456 void QuicTestClient::WaitForWriteToFlush() { 457 void QuicTestClient::WaitForWriteToFlush() {
457 while (connected() && client()->session()->HasDataToWrite()) { 458 while (connected() && client()->session()->HasDataToWrite()) {
458 client_->WaitForEvents(); 459 client_->WaitForEvents();
459 } 460 }
460 } 461 }
461 462
462 } // namespace test 463 } // namespace test
463 } // namespace tools 464 } // namespace tools
464 } // namespace net 465 } // namespace net
OLDNEW
« net/tools/quic/quic_client_session.cc ('K') | « net/tools/quic/quic_client_session.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698