Chromium Code Reviews| Index: components/rappor/bloom_filter.cc |
| diff --git a/components/rappor/bloom_filter.cc b/components/rappor/bloom_filter.cc |
| index d3f9e6339328714bc301237173e4f93baee96fee..45c7dc2523542b1e3f9874ce8a4f9eaa6a287182 100644 |
| --- a/components/rappor/bloom_filter.cc |
| +++ b/components/rappor/bloom_filter.cc |
| @@ -33,4 +33,17 @@ void BloomFilter::AddString(const std::string& str) { |
| } |
| } |
| +void BloomFilter::Clear() { |
| + for (size_t i = 0; i < bytes_.size(); ++i) { |
| + bytes_[i] = 0; |
| + } |
| +} |
| + |
| +void BloomFilter::SetBytesForTesting(const ByteVector& bytes) { |
| + DCHECK_EQ(bytes.size(), bytes_.size()); |
|
Alexei Svitkine (slow)
2014/07/30 17:12:47
Nit: Swap params (expected size should be on the l
Steven Holte
2014/08/04 23:30:26
Done.
|
| + for (size_t i = 0; i < bytes_.size(); ++i) { |
| + bytes_[i] = bytes[i]; |
| + } |
| +} |
| + |
| } // namespace rappor |