Index: chrome/browser/safe_browsing/bloom_filter.h |
diff --git a/chrome/browser/safe_browsing/bloom_filter.h b/chrome/browser/safe_browsing/bloom_filter.h |
index 9730ffda9b006574059018ca6f34ba1a744ade42..5a1e6ef9a646ef920215bc6d54c4d460775b536e 100644 |
--- a/chrome/browser/safe_browsing/bloom_filter.h |
+++ b/chrome/browser/safe_browsing/bloom_filter.h |
@@ -66,6 +66,10 @@ class BloomFilter : public base::RefCountedThreadSafe<BloomFilter> { |
// tests wish to make their own calculations. |
static int FilterSizeForKeyCount(int key_count); |
+ // Check whether the contents of the bloom filter have changed since |
+ // construction. Present while debugging PrefixSet. |
+ bool CheckChecksum() const; |
+ |
private: |
friend class base::RefCountedThreadSafe<BloomFilter>; |
FRIEND_TEST_ALL_PREFIXES(SafeBrowsingBloomFilter, BloomFilterUse); |
@@ -102,6 +106,10 @@ class BloomFilter : public base::RefCountedThreadSafe<BloomFilter> { |
// Random keys used for hashing. |
HashKeys hash_keys_; |
+ // For debugging, used to verify that |hash_keys_| and |data_| have |
+ // not changed other than via constructor or Insert(). |
+ uint32 checksum_; |
+ |
DISALLOW_COPY_AND_ASSIGN(BloomFilter); |
}; |