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/core/crypto/quic_compressed_certs_cache.h" |
6 | 6 |
7 using std::string; | 7 using std::string; |
8 | 8 |
9 namespace net { | 9 namespace net { |
10 | 10 |
11 namespace { | 11 namespace { |
12 | 12 |
13 // Inline helper function for extending a 64-bit |seed| in-place with a 64-bit | 13 // Inline helper function for extending a 64-bit |seed| in-place with a 64-bit |
14 // |value|. Based on Boost's hash_combine function. | 14 // |value|. Based on Boost's hash_combine function. |
15 inline void hash_combine(uint64_t* seed, const uint64_t& val) { | 15 inline void hash_combine(uint64_t* seed, const uint64_t& val) { |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 uint64_t h = | 115 uint64_t h = |
116 std::hash<string>()(*uncompressed_certs.client_cached_cert_hashes); | 116 std::hash<string>()(*uncompressed_certs.client_cached_cert_hashes); |
117 hash_combine(&hash, h); | 117 hash_combine(&hash, h); |
118 | 118 |
119 hash_combine(&hash, | 119 hash_combine(&hash, |
120 reinterpret_cast<uint64_t>(uncompressed_certs.chain.get())); | 120 reinterpret_cast<uint64_t>(uncompressed_certs.chain.get())); |
121 return hash; | 121 return hash; |
122 } | 122 } |
123 | 123 |
124 } // namespace net | 124 } // namespace net |
OLD | NEW |