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

Side by Side Diff: net/tools/quic/quic_simple_client_bin.cc

Issue 2236973002: Landing Recent QUIC changes until 4AM, Aug 7, 2016 UTC-4 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: flip quic_sequencer_buffer_retire_block_in_time to true Created 4 years, 4 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
« no previous file with comments | « net/tools/quic/quic_server_test.cc ('k') | net/tools/quic/quic_simple_client_test.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 // A binary wrapper for QuicClient. 5 // A binary wrapper for QuicClient.
6 // Connects to a host using QUIC, sends a request to the provided URL, and 6 // Connects to a host using QUIC, sends a request to the provided URL, and
7 // displays the response. 7 // displays the response.
8 // 8 //
9 // Some usage examples: 9 // Some usage examples:
10 // 10 //
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 } 233 }
234 ip_addr = addresses[0].address(); 234 ip_addr = addresses[0].address();
235 } 235 }
236 236
237 string host_port = net::IPAddressToStringWithPort(ip_addr, FLAGS_port); 237 string host_port = net::IPAddressToStringWithPort(ip_addr, FLAGS_port);
238 VLOG(1) << "Resolved " << host << " to " << host_port << endl; 238 VLOG(1) << "Resolved " << host << " to " << host_port << endl;
239 239
240 // Build the client, and try to connect. 240 // Build the client, and try to connect.
241 net::QuicServerId server_id(url.host(), url.EffectiveIntPort(), 241 net::QuicServerId server_id(url.host(), url.EffectiveIntPort(),
242 net::PRIVACY_MODE_DISABLED); 242 net::PRIVACY_MODE_DISABLED);
243 net::QuicVersionVector versions = net::QuicSupportedVersions(); 243 net::QuicVersionVector versions = net::AllSupportedVersions();
244 if (FLAGS_quic_version != -1) { 244 if (FLAGS_quic_version != -1) {
245 versions.clear(); 245 versions.clear();
246 versions.push_back(static_cast<net::QuicVersion>(FLAGS_quic_version)); 246 versions.push_back(static_cast<net::QuicVersion>(FLAGS_quic_version));
247 } 247 }
248 // For secure QUIC we need to verify the cert chain. 248 // For secure QUIC we need to verify the cert chain.
249 std::unique_ptr<CertVerifier> cert_verifier(CertVerifier::CreateDefault()); 249 std::unique_ptr<CertVerifier> cert_verifier(CertVerifier::CreateDefault());
250 if (line->HasSwitch("disable-certificate-verification")) { 250 if (line->HasSwitch("disable-certificate-verification")) {
251 cert_verifier.reset(new FakeCertVerifier()); 251 cert_verifier.reset(new FakeCertVerifier());
252 } 252 }
253 std::unique_ptr<TransportSecurityState> transport_security_state( 253 std::unique_ptr<TransportSecurityState> transport_security_state(
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 return 0; 354 return 0;
355 } else { 355 } else {
356 cout << "Request failed (redirect " << response_code << ")." << endl; 356 cout << "Request failed (redirect " << response_code << ")." << endl;
357 return 1; 357 return 1;
358 } 358 }
359 } else { 359 } else {
360 cerr << "Request failed (" << response_code << ")." << endl; 360 cerr << "Request failed (" << response_code << ")." << endl;
361 return 1; 361 return 1;
362 } 362 }
363 } 363 }
OLDNEW
« no previous file with comments | « net/tools/quic/quic_server_test.cc ('k') | net/tools/quic/quic_simple_client_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698