Home
last modified time | relevance | path

Searched refs:SBPrefix (Results 1 – 25 of 26) sorted by relevance

12

/external/chromium/chrome/browser/safe_browsing/
Dprefix_set_unittest.cc33 const SBPrefix prefix = static_cast<SBPrefix>(base::RandUint64()); in SetUpTestCase()
45 const std::vector<SBPrefix> &prefixes) { in CheckPrefixes()
48 std::set<SBPrefix> check(prefixes.begin(), prefixes.end()); in CheckPrefixes()
49 std::vector<SBPrefix> prefixes_copy; in CheckPrefixes()
57 const SBPrefix left_sibling = prefixes[i] - 1; in CheckPrefixes()
61 const SBPrefix right_sibling = prefixes[i] + 1; in CheckPrefixes()
145 static std::vector<SBPrefix> shared_prefixes_;
150 std::vector<SBPrefix> PrefixSetTest::shared_prefixes_;
160 const std::vector<SBPrefix> empty; in TEST_F()
169 const std::vector<SBPrefix> prefixes(100, 0); in TEST_F()
[all …]
Dsafe_browsing_database.h89 std::vector<SBPrefix>* prefix_hits,
97 std::vector<SBPrefix>* prefix_hits) = 0;
101 virtual bool ContainsDownloadHashPrefix(const SBPrefix& prefix) = 0;
141 const std::vector<SBPrefix>& prefixes,
211 std::vector<SBPrefix>* prefix_hits,
215 std::vector<SBPrefix>* prefix_hits);
216 virtual bool ContainsDownloadHashPrefix(const SBPrefix& prefix);
223 virtual void CacheHashResults(const std::vector<SBPrefix>& prefixes,
263 void InsertAdd(int chunk, SBPrefix host, const SBEntry* entry, int list_id);
265 void InsertSub(int chunk, SBPrefix host, const SBEntry* entry, int list_id);
[all …]
Dsafe_browsing_store.h46 SBPrefix prefix;
48 SBAddPrefix(int32 id, SBPrefix p) : chunk_id(id), prefix(p) {} in SBAddPrefix()
52 SBPrefix GetAddPrefix() const { return prefix; } in GetAddPrefix()
58 SBPrefix add_prefix;
65 SBPrefix GetAddPrefix() const { return add_prefix; } in GetAddPrefix()
87 SBPrefix GetAddPrefix() const { return full_hash.prefix; } in GetAddPrefix()
100 SBPrefix GetAddPrefix() const { return full_hash.prefix; } in GetAddPrefix()
152 const std::set<SBPrefix>& prefix_misses);
196 virtual bool WriteAddPrefix(int32 chunk_id, SBPrefix prefix) = 0;
201 int32 add_chunk_id, SBPrefix prefix) = 0;
[all …]
Dprotocol_parser.cc119 const std::vector<SBPrefix>& prefixes, std::string* request) { in FormatGetHash()
124 sizeof(SBPrefix), in FormatGetHash()
125 sizeof(SBPrefix) * prefixes.size())); in FormatGetHash()
128 sizeof(SBPrefix)); in FormatGetHash()
291 if (hash_len != sizeof(SBPrefix) && hash_len != sizeof(SBFullHash)) { in ParseChunk()
337 SBEntry::Type type = hash_len == sizeof(SBPrefix) ? in ParseAddChunk()
351 SBPrefix host; in ParseAddChunk()
352 const int min_size = sizeof(SBPrefix) + 1; in ParseAddChunk()
375 SBEntry::Type type = hash_len == sizeof(SBPrefix) ? in ParseSubChunk()
390 SBPrefix host; in ParseSubChunk()
[all …]
Dprefix_set.h63 explicit PrefixSet(const std::vector<SBPrefix>& sorted_prefixes);
67 bool Exists(SBPrefix prefix) const;
75 void GetPrefixes(std::vector<SBPrefix>* prefixes) const;
105 PrefixSet(std::vector<std::pair<SBPrefix,size_t> > *index,
112 std::vector<std::pair<SBPrefix,size_t> > index_;
Dprefix_set.cc33 bool PrefixLess(const std::pair<SBPrefix,size_t>& a, in PrefixLess() argument
34 const std::pair<SBPrefix,size_t>& b) { in PrefixLess()
42 PrefixSet::PrefixSet(const std::vector<SBPrefix>& sorted_prefixes) { in PrefixSet()
45 SBPrefix prev_prefix = sorted_prefixes[0]; in PrefixSet()
92 static const size_t kMaxBitsPerPrefix = sizeof(SBPrefix) * CHAR_BIT; in PrefixSet()
99 PrefixSet::PrefixSet(std::vector<std::pair<SBPrefix,size_t> > *index, in PrefixSet() argument
108 bool PrefixSet::Exists(SBPrefix prefix) const { in Exists()
113 std::vector<std::pair<SBPrefix,size_t> >::const_iterator in Exists()
115 std::pair<SBPrefix,size_t>(prefix, 0), in Exists()
129 SBPrefix current = iter->first; in Exists()
[all …]
Dfilter_false_positive_perftest.cc105 const std::vector<SBPrefix>& prefixes, in BuildBloomFilter()
126 bool ReadDatabase(const FilePath& path, std::vector<SBPrefix>* prefixes) { in ReadDatabase()
164 std::vector<SBPrefix>* prefixes) { in GeneratePrefixHits()
178 SBPrefix prefix; in GeneratePrefixHits()
189 bool IsPrefixInDatabase(SBPrefix prefix, in IsPrefixInDatabase()
190 const std::vector<SBPrefix>& prefixes) { in IsPrefixInDatabase()
198 SBPrefix prefix_mid = prefixes[mid]; in IsPrefixInDatabase()
215 const std::vector<SBPrefix>& prefix_list) { in CalculateBloomFilterFalsePositives()
251 std::vector<SBPrefix> prefixes; in CalculateBloomFilterFalsePositives()
293 std::vector<SBPrefix> prefix_list; in TEST()
[all …]
Dsafe_browsing_util.h24 typedef int32 SBPrefix; typedef
36 SBPrefix prefix;
49 SBPrefix host;
181 return IsPrefix() ? sizeof(SBPrefix) : sizeof(SBFullHash); in HashLen()
193 const SBPrefix& PrefixAt(int index) const;
198 void SetPrefixAt(int index, const SBPrefix& prefix);
205 SBPrefix prefix;
249 SBPrefix add_prefixes_[1];
Dbloom_filter_unittest.cc23 SBPrefix GenHash() { in GenHash()
24 return static_cast<SBPrefix>(base::RandUint64()); in GenHash()
37 typedef std::set<SBPrefix> Values; in TEST()
40 SBPrefix value = GenHash(); in TEST()
61 SBPrefix value = GenHash(); in TEST()
Dsafe_browsing_database.cc113 std::vector<SBPrefix>* prefixes) { in GetDownloadUrlPrefixes()
130 void GetCachedFullHashesForBrowse(const std::vector<SBPrefix>& prefix_hits, in GetCachedFullHashesForBrowse()
137 std::vector<SBPrefix>::const_iterator piter = prefix_hits.begin(); in GetCachedFullHashesForBrowse()
264 std::vector<SBPrefix> prefixes; in PrefixSetFromAddPrefixes()
276 std::vector<SBPrefix> restored; in PrefixSetFromAddPrefixes()
312 SBPrefix prev = restored[0]; in PrefixSetFromAddPrefixes()
368 std::vector<SBPrefix> difference; in PrefixSetFromAddPrefixes()
570 prefix_set_.reset(new safe_browsing::PrefixSet(std::vector<SBPrefix>())); in ResetDatabase()
582 std::vector<SBPrefix>* prefix_hits, in ContainsBrowseUrl()
604 std::vector<SBPrefix> restored; in ContainsBrowseUrl()
[all …]
Dsafe_browsing_service_browsertest.cc51 std::vector<SBPrefix>* prefix_hits, in ContainsBrowseUrl()
60 std::vector<SBPrefix>* prefix_hits) { in ContainsDownloadUrl()
70 virtual bool ContainsDownloadHashPrefix(const SBPrefix& prefix) { in ContainsDownloadHashPrefix()
90 virtual void CacheHashResults(const std::vector<SBPrefix>& prefixes, in CacheHashResults()
99 const std::vector<SBPrefix>& prefix_hits, in AddUrl()
107 void AddDownloadPrefix(SBPrefix prefix) { in AddDownloadPrefix()
114 std::vector<SBPrefix> prefix_hits;
121 std::vector<SBPrefix>* prefix_hits, in ContainsUrl()
148 base::hash_set<SBPrefix> download_digest_prefix_;
197 const std::vector<SBPrefix>& prefixes) { in GetFullHash()
[all …]
Dsafe_browsing_store_file.h125 virtual bool WriteAddPrefix(int32 chunk_id, SBPrefix prefix);
130 int32 add_chunk_id, SBPrefix prefix);
139 const std::set<SBPrefix>& prefix_misses,
163 const std::set<SBPrefix>& prefix_misses,
Dbloom_filter.h42 void Insert(SBPrefix hash);
43 bool Exists(SBPrefix hash) const;
Dprotocol_parser.h95 void FormatGetHash(const std::vector<SBPrefix>& prefixes,
120 SBPrefix* host,
Dsafe_browsing_database_unittest.cc27 SBPrefix Sha256Prefix(const std::string& str) { in Sha256Prefix()
28 SBPrefix prefix; in Sha256Prefix()
43 const SBPrefix& host_prefix, in InsertAddChunkHostPrefixValue()
44 const SBPrefix& url_prefix) { in InsertAddChunkHostPrefixValue()
120 const SBPrefix& host_prefix, in InsertSubChunkHostPrefixValue()
121 const SBPrefix& url_prefix) { in InsertSubChunkHostPrefixValue()
497 std::vector<SBPrefix> prefix_hits; in TEST_F()
779 std::vector<SBPrefix> prefix_hits; in TEST_F()
839 std::vector<SBPrefix> prefixes; in PopulateDatabaseForCacheTest()
851 std::vector<SBPrefix> prefixes; in TEST_F()
[all …]
Dsafe_browsing_store_unittest_helper.cc47 std::set<SBPrefix> prefix_misses; in SafeBrowsingStoreTestEmpty()
92 std::set<SBPrefix> prefix_misses; in SafeBrowsingStoreTestStorePrefix()
165 std::set<SBPrefix> prefix_misses; in SafeBrowsingStoreTestSubKnockout()
269 std::set<SBPrefix> prefix_misses; in SafeBrowsingStoreTestDeleteChunks()
339 std::set<SBPrefix> prefix_misses; in SafeBrowsingStoreTestDelete()
Dsafe_browsing_service.h86 std::vector<SBPrefix> prefix_hits;
271 typedef base::hash_map<SBPrefix, GetHashRequestors> GetHashRequests;
352 void CacheHashResults(const std::vector<SBPrefix>& prefixes,
Dsafe_browsing_store.cc135 const std::set<SBPrefix>& prefix_misses) { in SBCheckPrefixMisses()
150 std::set<SBPrefix> false_misses(prefix_misses.begin(), prefix_misses.end()); in SBCheckPrefixMisses()
Dbloom_filter.cc71 void BloomFilter::Insert(SBPrefix hash) { in Insert()
79 bool BloomFilter::Exists(SBPrefix hash) const { in Exists()
Dsafe_browsing_store_file.cc282 bool SafeBrowsingStoreFile::WriteAddPrefix(int32 chunk_id, SBPrefix prefix) { in WriteAddPrefix()
343 SBPrefix prefix) { in WriteSubPrefix()
476 const std::set<SBPrefix>& prefix_misses, in DoUpdate()
673 const std::set<SBPrefix>& prefix_misses, in FinishUpdate()
Dsafe_browsing_service.cc280 std::vector<SBPrefix> prefix_hits; in CheckBrowseUrl()
396 std::vector<SBPrefix> prefixes = check->prefix_hits; in HandleGetHashResults()
715 SBPrefix prefix = check->prefix_hits[0]; in OnCheckDone()
929 const std::vector<SBPrefix>& prefixes, in CacheHashResults()
940 SBPrefix prefix = check->prefix_hits[0]; in OnHandleGetHashResults()
1118 std::vector<SBPrefix> prefix_hits; in CheckDownloadUrlOnSBThread()
Dsafe_browsing_util.cc92 return sizeof(SBPrefix); in PrefixSize()
130 const SBPrefix& SBEntry::PrefixAt(int index) const { in PrefixAt()
142 void SBEntry::SetPrefixAt(int index, const SBPrefix& prefix) { in SetPrefixAt()
Dsafe_browsing_store_file_unittest.cc101 std::set<SBPrefix> prefix_misses; in TEST_F()
Dprotocol_manager.h116 const std::vector<SBPrefix>& prefixes);
Dprotocol_manager.cc159 const std::vector<SBPrefix>& prefixes) { in GetFullHash()

12