| OLD | NEW |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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/quic/quartc/quartc_session.h" | 5 #include "net/quic/quartc/quartc_session.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 explicit FakeProofSource(bool success) : success_(success) {} | 51 explicit FakeProofSource(bool success) : success_(success) {} |
| 52 | 52 |
| 53 // ProofSource override. | 53 // ProofSource override. |
| 54 bool GetProof(const IPAddress& server_ip, | 54 bool GetProof(const IPAddress& server_ip, |
| 55 const std::string& hostname, | 55 const std::string& hostname, |
| 56 const std::string& server_config, | 56 const std::string& server_config, |
| 57 net::QuicVersion quic_version, | 57 net::QuicVersion quic_version, |
| 58 base::StringPiece chlo_hash, | 58 base::StringPiece chlo_hash, |
| 59 const net::QuicTagVector& connection_options, | 59 const net::QuicTagVector& connection_options, |
| 60 scoped_refptr<net::ProofSource::Chain>* out_certs, | 60 scoped_refptr<net::ProofSource::Chain>* out_certs, |
| 61 std::string* out_signature, | 61 net::QuicCryptoProof* proof) override { |
| 62 std::string* out_leaf_cert_sct) override { | |
| 63 if (success_) { | 62 if (success_) { |
| 64 std::vector<std::string> certs; | 63 std::vector<std::string> certs; |
| 65 certs.push_back("Required to establish handshake"); | 64 certs.push_back("Required to establish handshake"); |
| 66 *out_certs = new ProofSource::Chain(certs); | 65 *out_certs = new ProofSource::Chain(certs); |
| 67 *out_signature = "Signature"; | 66 proof->signature = "Signature"; |
| 68 *out_leaf_cert_sct = "Time"; | 67 proof->leaf_cert_scts = "Time"; |
| 69 } | 68 } |
| 70 return success_; | 69 return success_; |
| 71 } | 70 } |
| 72 | 71 |
| 73 void GetProof(const net::IPAddress& server_ip, | 72 void GetProof(const net::IPAddress& server_ip, |
| 74 const std::string& hostname, | 73 const std::string& hostname, |
| 75 const std::string& server_config, | 74 const std::string& server_config, |
| 76 net::QuicVersion quic_version, | 75 net::QuicVersion quic_version, |
| 77 base::StringPiece chlo_hash, | 76 base::StringPiece chlo_hash, |
| 78 const net::QuicTagVector& connection_options, | 77 const net::QuicTagVector& connection_options, |
| (...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 EXPECT_FALSE(client_peer_->IsClosedStream(id)); | 499 EXPECT_FALSE(client_peer_->IsClosedStream(id)); |
| 501 stream->SetDelegate(client_peer_->stream_delegate()); | 500 stream->SetDelegate(client_peer_->stream_delegate()); |
| 502 stream->Close(); | 501 stream->Close(); |
| 503 RunLoopWithTimeout(); | 502 RunLoopWithTimeout(); |
| 504 EXPECT_TRUE(client_peer_->IsClosedStream(id)); | 503 EXPECT_TRUE(client_peer_->IsClosedStream(id)); |
| 505 } | 504 } |
| 506 | 505 |
| 507 } // namespace | 506 } // namespace |
| 508 } // namespace test | 507 } // namespace test |
| 509 } // namespace net | 508 } // namespace net |
| OLD | NEW |