| 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/test_tools/fake_proof_source.h" | 5 #include "net/quic/test_tools/fake_proof_source.h" |
| 6 | 6 |
| 7 #include "net/quic/platform/api/quic_logging.h" | 7 #include "net/quic/platform/api/quic_logging.h" |
| 8 #include "net/quic/test_tools/crypto_test_utils.h" | 8 #include "net/quic/test_tools/crypto_test_utils.h" |
| 9 | 9 |
| 10 using std::string; | 10 using std::string; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 void FakeProofSource::Activate() { | 42 void FakeProofSource::Activate() { |
| 43 active_ = true; | 43 active_ = true; |
| 44 } | 44 } |
| 45 | 45 |
| 46 void FakeProofSource::GetProof( | 46 void FakeProofSource::GetProof( |
| 47 const QuicSocketAddress& server_address, | 47 const QuicSocketAddress& server_address, |
| 48 const string& hostname, | 48 const string& hostname, |
| 49 const string& server_config, | 49 const string& server_config, |
| 50 QuicVersion quic_version, | 50 QuicVersion quic_version, |
| 51 StringPiece chlo_hash, | 51 QuicStringPiece chlo_hash, |
| 52 const QuicTagVector& connection_options, | 52 const QuicTagVector& connection_options, |
| 53 std::unique_ptr<ProofSource::Callback> callback) { | 53 std::unique_ptr<ProofSource::Callback> callback) { |
| 54 if (!active_) { | 54 if (!active_) { |
| 55 delegate_->GetProof(server_address, hostname, server_config, quic_version, | 55 delegate_->GetProof(server_address, hostname, server_config, quic_version, |
| 56 chlo_hash, connection_options, std::move(callback)); | 56 chlo_hash, connection_options, std::move(callback)); |
| 57 return; | 57 return; |
| 58 } | 58 } |
| 59 | 59 |
| 60 params_.push_back(Params{server_address, hostname, server_config, | 60 params_.push_back(Params{server_address, hostname, server_config, |
| 61 quic_version, chlo_hash.as_string(), | 61 quic_version, chlo_hash.as_string(), |
| (...skipping 14 matching lines...) Expand all Loading... |
| 76 params.server_config, params.quic_version, | 76 params.server_config, params.quic_version, |
| 77 params.chlo_hash, params.connection_options, | 77 params.chlo_hash, params.connection_options, |
| 78 std::move(params.callback)); | 78 std::move(params.callback)); |
| 79 | 79 |
| 80 auto it = params_.begin() + n; | 80 auto it = params_.begin() + n; |
| 81 params_.erase(it); | 81 params_.erase(it); |
| 82 } | 82 } |
| 83 | 83 |
| 84 } // namespace test | 84 } // namespace test |
| 85 } // namespace net | 85 } // namespace net |
| OLD | NEW |