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

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, 5 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') | components/rappor/bloom_filter.cc » ('J')
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..3ca1e8273e13311e625847c10aa6ebdda847afcc 100644
--- a/components/rappor/bloom_filter.h
+++ b/components/rappor/bloom_filter.h
@@ -28,9 +28,15 @@ class BloomFilter {
// Add a single string to the Bloom filter.
void AddString(const std::string& str);
+ // Clears all bloom filter bits.
+ void Clear();
+
// 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') | components/rappor/bloom_filter.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698