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

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

Issue 346853003: Added SetUserAgentID method to QuicClient which calls crypto_config_'s (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed wtc's comments for Patch Set 1 Created 6 years, 6 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/tools/quic/test_tools/quic_test_client.h ('k') | no next file » | 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/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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 void QuicTestClient::ExpectCertificates(bool on) { 228 void QuicTestClient::ExpectCertificates(bool on) {
229 if (on) { 229 if (on) {
230 proof_verifier_ = new RecordingProofVerifier; 230 proof_verifier_ = new RecordingProofVerifier;
231 client_->SetProofVerifier(proof_verifier_); 231 client_->SetProofVerifier(proof_verifier_);
232 } else { 232 } else {
233 proof_verifier_ = NULL; 233 proof_verifier_ = NULL;
234 client_->SetProofVerifier(NULL); 234 client_->SetProofVerifier(NULL);
235 } 235 }
236 } 236 }
237 237
238 void QuicTestClient::SetUserAgentID(const string& user_agent_id) {
239 client_->SetUserAgentID(user_agent_id);
240 }
241
238 ssize_t QuicTestClient::SendRequest(const string& uri) { 242 ssize_t QuicTestClient::SendRequest(const string& uri) {
239 HTTPMessage message(HttpConstants::HTTP_1_1, 243 HTTPMessage message(HttpConstants::HTTP_1_1,
240 HttpConstants::GET, 244 HttpConstants::GET,
241 uri); 245 uri);
242 return SendMessage(message); 246 return SendMessage(message);
243 } 247 }
244 248
245 ssize_t QuicTestClient::SendMessage(const HTTPMessage& message) { 249 ssize_t QuicTestClient::SendMessage(const HTTPMessage& message) {
246 stream_ = NULL; // Always force creation of a stream for SendMessage. 250 stream_ = NULL; // Always force creation of a stream for SendMessage.
247 251
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 // Set policy for headers and crypto streams. 561 // Set policy for headers and crypto streams.
558 ReliableQuicStreamPeer::SetFecPolicy( 562 ReliableQuicStreamPeer::SetFecPolicy(
559 QuicSessionPeer::GetHeadersStream(client()->session()), fec_policy); 563 QuicSessionPeer::GetHeadersStream(client()->session()), fec_policy);
560 ReliableQuicStreamPeer::SetFecPolicy(client()->session()->GetCryptoStream(), 564 ReliableQuicStreamPeer::SetFecPolicy(client()->session()->GetCryptoStream(),
561 fec_policy); 565 fec_policy);
562 } 566 }
563 567
564 } // namespace test 568 } // namespace test
565 } // namespace tools 569 } // namespace tools
566 } // namespace net 570 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/test_tools/quic_test_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698