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

Unified Diff: components/rappor/bloom_filter.h

Issue 419683014: Randomly select a single rappor sample when more than one is collected. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/rappor/bloom_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/rappor/bloom_filter.h
diff --git a/components/rappor/bloom_filter.h b/components/rappor/bloom_filter.h
index d9acfa4efce9aead751059d2b87ab544036a70f3..482f1c3668eeadff185ba9ead35aa4b90cf70e2a 100644
--- a/components/rappor/bloom_filter.h
+++ b/components/rappor/bloom_filter.h
@@ -25,12 +25,15 @@ class BloomFilter {
uint32_t hash_seed_offset);
~BloomFilter();
- // Add a single string to the Bloom filter.
- void AddString(const std::string& str);
+ // Sets the Bloom filter bits to contain a single string.
+ void SetString(const std::string& str);
// Returns the current value of the Bloom filter's bit array.
const ByteVector& bytes() const { return bytes_; };
+ // Sets bytes for testing purposes.
+ void SetBytesForTesting(const ByteVector& bytes);
+
private:
// Stores the byte array of the Bloom filter.
ByteVector bytes_;
« no previous file with comments | « no previous file | components/rappor/bloom_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698