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

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

Issue 6765035: More PrefixSet diagnostics. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 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 025b163ea787cd35a15de63c6b8435202f2752de..f6d513b048bd8411db54a1d0c07c746c78a48c57 100644
--- a/chrome/browser/safe_browsing/prefix_set.h
+++ b/chrome/browser/safe_browsing/prefix_set.h
@@ -74,6 +74,22 @@ class PrefixSet {
// |prefixes|. Prefixes will be added in sorted order.
void GetPrefixes(std::vector<SBPrefix>* prefixes) const;
+ // TODO(shess): The following are debugging accessors. Delete once
+ // the encoding problem is figured out.
+
+ size_t IndexBinFor(size_t target_index) const;
+
+ // The number of prefixes represented.
+ size_t GetSize() const;
+
+ // Returns |true| if the element at |target_index| is between items in the
+ // |index_| array.
+ bool IsDeltaAt(size_t target_index) const;
+
+ // Returns the delta used to calculate the element at
+ // |target_index|. Only call if |IsDeltaAt()| returned |true|.
+ uint16 DeltaAt(size_t target_index) 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