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

Unified Diff: chrome/browser/safe_browsing/prefix_set.h

Issue 10834045: Instrument to catch corruption constructing safe-browsing filters. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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 | chrome/browser/safe_browsing/prefix_set.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/prefix_set.h
diff --git a/chrome/browser/safe_browsing/prefix_set.h b/chrome/browser/safe_browsing/prefix_set.h
index 91fe7fb4957f41ade2ab2fbf34fc22cf4970c6cb..abecbd91e914e47bd84d77f3222c62dcdb92726c 100644
--- a/chrome/browser/safe_browsing/prefix_set.h
+++ b/chrome/browser/safe_browsing/prefix_set.h
@@ -89,10 +89,14 @@ class PrefixSet {
// |target_index|. Only call if |IsDeltaAt()| returned |true|.
uint16 DeltaAt(size_t target_index) const;
- // Check whether |index_| and |deltas_| still match the CRC
+ // Check whether |index_| and |deltas_| still match the checksum
// generated during construction.
bool CheckChecksum() const;
+ // Accumulates xor checksum over what GetPrefixes() would return,
+ // without requiring a large temporary structure.
+ SBPrefix GetPrefixesChecksum() const;
+
private:
// Maximum number of consecutive deltas to encode before generating
// a new index entry. This helps keep the worst-case performance
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/prefix_set.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698