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

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

Issue 188103004: C++ Readability review for holte (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix struct/class declaration Created 6 years, 9 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 | « no previous file | components/rappor/byte_vector_utils.h » ('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 <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/macros.h"
11 #include "components/rappor/byte_vector_utils.h" 12 #include "components/rappor/byte_vector_utils.h"
12 13
13 namespace rappor { 14 namespace rappor {
14 15
15 // BloomFilter is a simple Bloom filter for keeping track of a set of strings. 16 // BloomFilter is a simple Bloom filter for keeping track of a set of strings.
16 class BloomFilter { 17 class BloomFilter {
17 public: 18 public:
18 // Constructs a BloomFilter using |bytes_size| bytes of Bloom filter bits, 19 // Constructs a BloomFilter using |bytes_size| bytes of Bloom filter bits,
19 // and |hash_function_count| hash functions to set bits in the filter. The 20 // and |hash_function_count| hash functions to set bits in the filter. The
20 // hash functions will be generated by using seeds in the range 21 // hash functions will be generated by using seeds in the range
(...skipping 18 matching lines...) Expand all
39 40
40 // A number add to a hash function index to get a seed for that hash function. 41 // A number add to a hash function index to get a seed for that hash function.
41 uint32_t hash_seed_offset_; 42 uint32_t hash_seed_offset_;
42 43
43 DISALLOW_COPY_AND_ASSIGN(BloomFilter); 44 DISALLOW_COPY_AND_ASSIGN(BloomFilter);
44 }; 45 };
45 46
46 } // namespace rappor 47 } // namespace rappor
47 48
48 #endif // COMPONENTS_RAPPOR_BLOOM_FILTER_H_ 49 #endif // COMPONENTS_RAPPOR_BLOOM_FILTER_H_
OLDNEW
« no previous file with comments | « no previous file | components/rappor/byte_vector_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698