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/rand_util.h" | 7 #include "base/rand_util.h" |
8 | 8 |
9 namespace { | 9 namespace { |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 ~DummyProofSource() override {} | 28 ~DummyProofSource() override {} |
29 | 29 |
30 // ProofSource override. | 30 // ProofSource override. |
31 bool GetProof(const net::IPAddress& server_ip, | 31 bool GetProof(const net::IPAddress& server_ip, |
32 const std::string& hostname, | 32 const std::string& hostname, |
33 const std::string& server_config, | 33 const std::string& server_config, |
34 net::QuicVersion quic_version, | 34 net::QuicVersion quic_version, |
35 base::StringPiece chlo_hash, | 35 base::StringPiece chlo_hash, |
36 const net::QuicTagVector& connection_options, | 36 const net::QuicTagVector& connection_options, |
37 scoped_refptr<net::ProofSource::Chain>* out_chain, | 37 scoped_refptr<net::ProofSource::Chain>* out_chain, |
38 std::string* out_signature, | 38 net::QuicCryptoProof* proof) override { |
39 std::string* out_leaf_cert_sct) override { | |
40 std::vector<std::string> certs; | 39 std::vector<std::string> certs; |
41 certs.push_back("Dummy cert"); | 40 certs.push_back("Dummy cert"); |
42 *out_chain = new ProofSource::Chain(certs); | 41 *out_chain = new ProofSource::Chain(certs); |
43 *out_signature = "Dummy signature"; | 42 proof->signature = "Dummy signature"; |
44 *out_leaf_cert_sct = "Dummy timestamp"; | 43 proof->leaf_cert_scts = "Dummy timestamp"; |
45 return true; | 44 return true; |
46 } | 45 } |
47 | 46 |
48 void GetProof(const net::IPAddress& server_ip, | 47 void GetProof(const net::IPAddress& server_ip, |
49 const std::string& hostname, | 48 const std::string& hostname, |
50 const std::string& server_config, | 49 const std::string& server_config, |
51 net::QuicVersion quic_version, | 50 net::QuicVersion quic_version, |
52 base::StringPiece chlo_hash, | 51 base::StringPiece chlo_hash, |
53 const net::QuicTagVector& connection_options, | 52 const net::QuicTagVector& connection_options, |
54 std::unique_ptr<Callback> callback) override {} | 53 std::unique_ptr<Callback> callback) override {} |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 ActivateStream(std::unique_ptr<QuicStream>(stream)); | 282 ActivateStream(std::unique_ptr<QuicStream>(stream)); |
284 // Register the stream to the QuicWriteBlockedList. |priority| is clamped | 283 // Register the stream to the QuicWriteBlockedList. |priority| is clamped |
285 // between 0 and 7, with 0 being the highest priority and 7 the lowest | 284 // between 0 and 7, with 0 being the highest priority and 7 the lowest |
286 // priority. | 285 // priority. |
287 write_blocked_streams()->RegisterStream(stream->id(), priority); | 286 write_blocked_streams()->RegisterStream(stream->id(), priority); |
288 } | 287 } |
289 return stream; | 288 return stream; |
290 } | 289 } |
291 | 290 |
292 } // namespace net | 291 } // namespace net |
OLD | NEW |