Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(998)

Side by Side Diff: components/rappor/bloom_filter.h

Issue 1551433002: Switch to standard integer types in components/, part 3 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/query_parser/snippet_unittest.cc ('k') | components/rappor/bloom_filter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <stdint.h>
9
8 #include <string> 10 #include <string>
9 11
10 #include "base/basictypes.h"
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "components/rappor/byte_vector_utils.h" 13 #include "components/rappor/byte_vector_utils.h"
13 14
14 namespace rappor { 15 namespace rappor {
15 16
16 // BloomFilter is a simple Bloom filter for keeping track of a set of strings. 17 // BloomFilter is a simple Bloom filter for keeping track of a set of strings.
17 class BloomFilter { 18 class BloomFilter {
18 public: 19 public:
19 // Constructs a BloomFilter using |bytes_size| bytes of Bloom filter bits, 20 // Constructs a BloomFilter using |bytes_size| bytes of Bloom filter bits,
20 // and |hash_function_count| hash functions to set bits in the filter. The 21 // and |hash_function_count| hash functions to set bits in the filter. The
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 uint64_t GetBloomBits(uint32_t bytes_size, 55 uint64_t GetBloomBits(uint32_t bytes_size,
55 uint32_t hash_function_count, 56 uint32_t hash_function_count,
56 uint32_t hash_seed_offset, 57 uint32_t hash_seed_offset,
57 const std::string& str); 58 const std::string& str);
58 59
59 } // namespace internal 60 } // namespace internal
60 61
61 } // namespace rappor 62 } // namespace rappor
62 63
63 #endif // COMPONENTS_RAPPOR_BLOOM_FILTER_H_ 64 #endif // COMPONENTS_RAPPOR_BLOOM_FILTER_H_
OLDNEW
« no previous file with comments | « components/query_parser/snippet_unittest.cc ('k') | components/rappor/bloom_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698