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

Side by Side Diff: net/tools/quic/test_tools/quic_test_client.cc

Issue 706203003: Update from https://crrev.com/303153 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 CHECK(test_writer_ == nullptr); 152 CHECK(test_writer_ == nullptr);
153 test_writer_ = writer; 153 test_writer_ = writer;
154 } 154 }
155 155
156 void MockableQuicClient::UseConnectionId(QuicConnectionId connection_id) { 156 void MockableQuicClient::UseConnectionId(QuicConnectionId connection_id) {
157 override_connection_id_ = connection_id; 157 override_connection_id_ = connection_id;
158 } 158 }
159 159
160 QuicTestClient::QuicTestClient(IPEndPoint server_address, 160 QuicTestClient::QuicTestClient(IPEndPoint server_address,
161 const string& server_hostname, 161 const string& server_hostname,
162 const QuicVersionVector& supported_versions)
163 : client_(new MockableQuicClient(server_address,
164 QuicServerId(server_hostname,
165 server_address.port(),
166 false,
167 PRIVACY_MODE_DISABLED),
168 supported_versions,
169 &epoll_server_)) {
170 Initialize(true);
171 }
172
173 QuicTestClient::QuicTestClient(IPEndPoint server_address,
174 const string& server_hostname,
175 bool secure, 162 bool secure,
176 const QuicVersionVector& supported_versions) 163 const QuicVersionVector& supported_versions)
177 : client_(new MockableQuicClient(server_address, 164 : client_(new MockableQuicClient(server_address,
178 QuicServerId(server_hostname, 165 QuicServerId(server_hostname,
179 server_address.port(), 166 server_address.port(),
180 secure, 167 secure,
181 PRIVACY_MODE_DISABLED), 168 PRIVACY_MODE_DISABLED),
182 supported_versions, 169 supported_versions,
183 &epoll_server_)) { 170 &epoll_server_)) {
184 Initialize(secure); 171 Initialize(secure);
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 // Set policy for headers and crypto streams. 551 // Set policy for headers and crypto streams.
565 ReliableQuicStreamPeer::SetFecPolicy( 552 ReliableQuicStreamPeer::SetFecPolicy(
566 QuicSessionPeer::GetHeadersStream(client()->session()), fec_policy); 553 QuicSessionPeer::GetHeadersStream(client()->session()), fec_policy);
567 ReliableQuicStreamPeer::SetFecPolicy(client()->session()->GetCryptoStream(), 554 ReliableQuicStreamPeer::SetFecPolicy(client()->session()->GetCryptoStream(),
568 fec_policy); 555 fec_policy);
569 } 556 }
570 557
571 } // namespace test 558 } // namespace test
572 } // namespace tools 559 } // namespace tools
573 } // namespace net 560 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/test_tools/quic_test_client.h ('k') | net/tools/quic/test_tools/quic_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698