summaryrefslogtreecommitdiffstats
path: root/chrome/browser/safe_browsing/prefix_set.h
diff options
context:
space:
mode:
authorshess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-18 05:25:48 +0000
committershess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-18 05:25:48 +0000
commitc8477a432601854d4e8e85a85cbbbf79af723ad2 (patch)
treea3cea1f99c18676ffe0f9bf32b2816342238196b /chrome/browser/safe_browsing/prefix_set.h
parentacc134844001b556ef162ad267dac826b3000ff0 (diff)
downloadchromium_src-c8477a432601854d4e8e85a85cbbbf79af723ad2.zip
chromium_src-c8477a432601854d4e8e85a85cbbbf79af723ad2.tar.gz
chromium_src-c8477a432601854d4e8e85a85cbbbf79af723ad2.tar.bz2
Safe-browsing PrefixSet cleanups.
Make sure SBPrefix is a fixed size. PrefixSet tests for single-element set, set with large deltas, and int32 space edge cases. PrefixSet::GetPrefixes() can be const. Consolidate the SafeBrowsingDatabase GetPrefixes() checking code. Check whether deltas fit by directly checking whether the delta fit. Add a histogram for checking if SBPrefix really was crazy. BUG=71832 TEST=none Review URL: http://codereview.chromium.org/6711021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78667 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/safe_browsing/prefix_set.h')
-rw-r--r--chrome/browser/safe_browsing/prefix_set.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/chrome/browser/safe_browsing/prefix_set.h b/chrome/browser/safe_browsing/prefix_set.h
index 246beea..025b163 100644
--- a/chrome/browser/safe_browsing/prefix_set.h
+++ b/chrome/browser/safe_browsing/prefix_set.h
@@ -72,12 +72,9 @@ class PrefixSet {
// Regenerate the vector of prefixes passed to the constructor into
// |prefixes|. Prefixes will be added in sorted order.
- void GetPrefixes(std::vector<SBPrefix>* prefixes);
+ void GetPrefixes(std::vector<SBPrefix>* prefixes) const;
private:
- // Maximum delta that can be encoded in a 16-bit unsigned.
- static const unsigned kMaxDelta = 256 * 256;
-
// Maximum number of consecutive deltas to encode before generating
// a new index entry. This helps keep the worst-case performance
// for |Exists()| under control.