| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 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/crypto/quic_compressed_certs_cache.h" | 5 #include "net/quic/crypto/quic_compressed_certs_cache.h" |
| 6 | 6 |
| 7 namespace net { | 7 namespace net { |
| 8 | 8 |
| 9 namespace { | 9 namespace { |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 QuicCompressedCertsCache::CachedCerts::CachedCerts() {} | 31 QuicCompressedCertsCache::CachedCerts::CachedCerts() {} |
| 32 | 32 |
| 33 QuicCompressedCertsCache::CachedCerts::CachedCerts( | 33 QuicCompressedCertsCache::CachedCerts::CachedCerts( |
| 34 const UncompressedCerts& uncompressed_certs, | 34 const UncompressedCerts& uncompressed_certs, |
| 35 const string& compressed_cert) | 35 const string& compressed_cert) |
| 36 : chain_(uncompressed_certs.chain), | 36 : chain_(uncompressed_certs.chain), |
| 37 client_common_set_hashes_(*uncompressed_certs.client_common_set_hashes), | 37 client_common_set_hashes_(*uncompressed_certs.client_common_set_hashes), |
| 38 client_cached_cert_hashes_(*uncompressed_certs.client_cached_cert_hashes), | 38 client_cached_cert_hashes_(*uncompressed_certs.client_cached_cert_hashes), |
| 39 compressed_cert_(compressed_cert) {} | 39 compressed_cert_(compressed_cert) {} |
| 40 | 40 |
| 41 QuicCompressedCertsCache::CachedCerts::CachedCerts(const CachedCerts& other) = |
| 42 default; |
| 43 |
| 41 QuicCompressedCertsCache::CachedCerts::~CachedCerts() {} | 44 QuicCompressedCertsCache::CachedCerts::~CachedCerts() {} |
| 42 | 45 |
| 43 bool QuicCompressedCertsCache::CachedCerts::MatchesUncompressedCerts( | 46 bool QuicCompressedCertsCache::CachedCerts::MatchesUncompressedCerts( |
| 44 const UncompressedCerts& uncompressed_certs) const { | 47 const UncompressedCerts& uncompressed_certs) const { |
| 45 return (client_common_set_hashes_ == | 48 return (client_common_set_hashes_ == |
| 46 *uncompressed_certs.client_common_set_hashes && | 49 *uncompressed_certs.client_common_set_hashes && |
| 47 client_cached_cert_hashes_ == | 50 client_cached_cert_hashes_ == |
| 48 *uncompressed_certs.client_cached_cert_hashes && | 51 *uncompressed_certs.client_cached_cert_hashes && |
| 49 chain_ == uncompressed_certs.chain); | 52 chain_ == uncompressed_certs.chain); |
| 50 } | 53 } |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 uint64_t h = | 113 uint64_t h = |
| 111 std::hash<string>()(*uncompressed_certs.client_cached_cert_hashes); | 114 std::hash<string>()(*uncompressed_certs.client_cached_cert_hashes); |
| 112 hash_combine(&hash, h); | 115 hash_combine(&hash, h); |
| 113 | 116 |
| 114 hash_combine(&hash, | 117 hash_combine(&hash, |
| 115 reinterpret_cast<uint64_t>(uncompressed_certs.chain.get())); | 118 reinterpret_cast<uint64_t>(uncompressed_certs.chain.get())); |
| 116 return hash; | 119 return hash; |
| 117 } | 120 } |
| 118 | 121 |
| 119 } // namespace net | 122 } // namespace net |
| OLD | NEW |