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

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

Issue 6591087: Additional validation code for PrefixSet. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Back out testing chg. Created 9 years, 10 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 229b772ef2dddb4d98f58404b0fe40ec143e06e5..cb2cd9f6debfa64071cc776fed1993682aab6505 100644
--- a/chrome/browser/safe_browsing/prefix_set.h
+++ b/chrome/browser/safe_browsing/prefix_set.h
@@ -59,12 +59,16 @@ namespace safe_browsing {
class PrefixSet {
public:
- explicit PrefixSet(const std::vector<SBPrefix>& prefixes);
+ explicit PrefixSet(const std::vector<SBPrefix>& sorted_prefixes);
~PrefixSet();
// |true| if |prefix| was in |prefixes| passed to the constructor.
bool Exists(SBPrefix prefix) const;
+ // Regenerate the vector of prefixes passed to the constructor into
+ // |prefixes|. Prefixes will be added in sorted order.
+ void GetPrefixes(std::vector<SBPrefix>* prefixes);
+
private:
// Maximum delta that can be encoded in a 16-bit unsigned.
static const unsigned kMaxDelta = 256 * 256;
« 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