OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef COMPONENTS_RAPPOR_BLOOM_FILTER_H_ | 5 #ifndef COMPONENTS_RAPPOR_BLOOM_FILTER_H_ |
6 #define COMPONENTS_RAPPOR_BLOOM_FILTER_H_ | 6 #define COMPONENTS_RAPPOR_BLOOM_FILTER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 | 40 |
41 // The number of bits to set for each string added. | 41 // The number of bits to set for each string added. |
42 uint32_t hash_function_count_; | 42 uint32_t hash_function_count_; |
43 | 43 |
44 // A number add to a hash function index to get a seed for that hash function. | 44 // A number add to a hash function index to get a seed for that hash function. |
45 uint32_t hash_seed_offset_; | 45 uint32_t hash_seed_offset_; |
46 | 46 |
47 DISALLOW_COPY_AND_ASSIGN(BloomFilter); | 47 DISALLOW_COPY_AND_ASSIGN(BloomFilter); |
48 }; | 48 }; |
49 | 49 |
| 50 |
| 51 namespace internal { |
| 52 |
| 53 // A function for getting bloom filters less than or equal to 64 bits. |
| 54 uint64_t GetBloomBits(uint32_t bytes_size, |
| 55 uint32_t hash_function_count, |
| 56 uint32_t hash_seed_offset, |
| 57 const std::string& str); |
| 58 |
| 59 } // namespace internal |
| 60 |
50 } // namespace rappor | 61 } // namespace rappor |
51 | 62 |
52 #endif // COMPONENTS_RAPPOR_BLOOM_FILTER_H_ | 63 #endif // COMPONENTS_RAPPOR_BLOOM_FILTER_H_ |
OLD | NEW |