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..2e92b6b2507e6bbc112e6b4652bd61245e55ec35 100644 |
--- a/chrome/browser/safe_browsing/prefix_set.h |
+++ b/chrome/browser/safe_browsing/prefix_set.h |
@@ -59,12 +59,17 @@ namespace safe_browsing { |
class PrefixSet { |
public: |
+ // |prefixes| must be sorted. |
lzheng
2011/03/03 22:30:07
How about rename the "prefixes" to "sorted_prefix
|
explicit PrefixSet(const std::vector<SBPrefix>& 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; |