| 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 #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 25 matching lines...) Expand all Loading... |
| 36 namespace net { | 36 namespace net { |
| 37 namespace test { | 37 namespace test { |
| 38 namespace { | 38 namespace { |
| 39 | 39 |
| 40 // RecordingProofVerifier accepts any certificate chain and records the common | 40 // RecordingProofVerifier accepts any certificate chain and records the common |
| 41 // name of the leaf. | 41 // name of the leaf. |
| 42 class RecordingProofVerifier : public ProofVerifier { | 42 class RecordingProofVerifier : public ProofVerifier { |
| 43 public: | 43 public: |
| 44 // ProofVerifier interface. | 44 // ProofVerifier interface. |
| 45 QuicAsyncStatus VerifyProof(const string& hostname, | 45 QuicAsyncStatus VerifyProof(const string& hostname, |
| 46 const uint16_t port, |
| 46 const string& server_config, | 47 const string& server_config, |
| 47 QuicVersion quic_version, | 48 QuicVersion quic_version, |
| 48 StringPiece chlo_hash, | 49 StringPiece chlo_hash, |
| 49 const vector<string>& certs, | 50 const vector<string>& certs, |
| 50 const string& cert_sct, | 51 const string& cert_sct, |
| 51 const string& signature, | 52 const string& signature, |
| 52 const ProofVerifyContext* context, | 53 const ProofVerifyContext* context, |
| 53 string* error_details, | 54 string* error_details, |
| 54 scoped_ptr<ProofVerifyDetails>* details, | 55 scoped_ptr<ProofVerifyDetails>* details, |
| 55 ProofVerifierCallback* callback) override { | 56 ProofVerifierCallback* callback) override { |
| (...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 664 CHECK(message); | 665 CHECK(message); |
| 665 message->headers()->SetRequestVersion( | 666 message->headers()->SetRequestVersion( |
| 666 HTTPMessage::VersionToString(HttpConstants::HTTP_1_1)); | 667 HTTPMessage::VersionToString(HttpConstants::HTTP_1_1)); |
| 667 message->headers()->SetRequestMethod( | 668 message->headers()->SetRequestMethod( |
| 668 HTTPMessage::MethodToString(HttpConstants::GET)); | 669 HTTPMessage::MethodToString(HttpConstants::GET)); |
| 669 message->headers()->SetRequestUri(uri); | 670 message->headers()->SetRequestUri(uri); |
| 670 } | 671 } |
| 671 | 672 |
| 672 } // namespace test | 673 } // namespace test |
| 673 } // namespace net | 674 } // namespace net |
| OLD | NEW |