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

Side by Side Diff: net/tools/quic/quic_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_client_base.h ('k') | net/tools/quic/quic_client_session.h » ('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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 ip_addr = addresses[0].address(); 232 ip_addr = addresses[0].address();
233 } 233 }
234 234
235 string host_port = net::IPAddressToStringWithPort(ip_addr, port); 235 string host_port = net::IPAddressToStringWithPort(ip_addr, port);
236 VLOG(1) << "Resolved " << host << " to " << host_port << endl; 236 VLOG(1) << "Resolved " << host << " to " << host_port << endl;
237 237
238 // Build the client, and try to connect. 238 // Build the client, and try to connect.
239 net::EpollServer epoll_server; 239 net::EpollServer epoll_server;
240 net::QuicServerId server_id(url.host(), url.EffectiveIntPort(), 240 net::QuicServerId server_id(url.host(), url.EffectiveIntPort(),
241 net::PRIVACY_MODE_DISABLED); 241 net::PRIVACY_MODE_DISABLED);
242 net::QuicVersionVector versions = net::QuicSupportedVersions(); 242 net::QuicVersionVector versions = net::AllSupportedVersions();
243 if (FLAGS_quic_version != -1) { 243 if (FLAGS_quic_version != -1) {
244 versions.clear(); 244 versions.clear();
245 versions.push_back(static_cast<net::QuicVersion>(FLAGS_quic_version)); 245 versions.push_back(static_cast<net::QuicVersion>(FLAGS_quic_version));
246 } 246 }
247 // For secure QUIC we need to verify the cert chain. 247 // For secure QUIC we need to verify the cert chain.
248 std::unique_ptr<CertVerifier> cert_verifier(CertVerifier::CreateDefault()); 248 std::unique_ptr<CertVerifier> cert_verifier(CertVerifier::CreateDefault());
249 if (line->HasSwitch("disable-certificate-verification")) { 249 if (line->HasSwitch("disable-certificate-verification")) {
250 cert_verifier.reset(new FakeCertVerifier()); 250 cert_verifier.reset(new FakeCertVerifier());
251 } 251 }
252 std::unique_ptr<TransportSecurityState> transport_security_state( 252 std::unique_ptr<TransportSecurityState> transport_security_state(
(...skipping 101 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_client_base.h ('k') | net/tools/quic/quic_client_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698