OLD | NEW |
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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 // Initial MTU of the connection. | 106 // Initial MTU of the connection. |
107 int32_t FLAGS_initial_mtu = 0; | 107 int32_t FLAGS_initial_mtu = 0; |
108 | 108 |
109 class FakeCertVerifier : public net::CertVerifier { | 109 class FakeCertVerifier : public net::CertVerifier { |
110 public: | 110 public: |
111 int Verify(const RequestParams& params, | 111 int Verify(const RequestParams& params, |
112 net::CRLSet* crl_set, | 112 net::CRLSet* crl_set, |
113 net::CertVerifyResult* verify_result, | 113 net::CertVerifyResult* verify_result, |
114 const net::CompletionCallback& callback, | 114 const net::CompletionCallback& callback, |
115 std::unique_ptr<Request>* out_req, | 115 std::unique_ptr<Request>* out_req, |
116 const net::BoundNetLog& net_log) override { | 116 const net::NetLogWithSource& net_log) override { |
117 return net::OK; | 117 return net::OK; |
118 } | 118 } |
119 | 119 |
120 // Returns true if this CertVerifier supports stapled OCSP responses. | 120 // Returns true if this CertVerifier supports stapled OCSP responses. |
121 bool SupportsOCSPStapling() override { return false; } | 121 bool SupportsOCSPStapling() override { return false; } |
122 }; | 122 }; |
123 | 123 |
124 int main(int argc, char* argv[]) { | 124 int main(int argc, char* argv[]) { |
125 base::CommandLine::Init(argc, argv); | 125 base::CommandLine::Init(argc, argv); |
126 base::CommandLine* line = base::CommandLine::ForCurrentProcess(); | 126 base::CommandLine* line = base::CommandLine::ForCurrentProcess(); |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 } |
OLD | NEW |