Home
last modified time | relevance | path

Searched refs:add_prefixes (Results 1 – 7 of 7) sorted by relevance

/external/chromium/chrome/browser/safe_browsing/
Dsafe_browsing_store_unittest.cc115 std::vector<SBAddPrefix> add_prefixes; in TEST() local
121 SBProcessSubs(&add_prefixes, &sub_prefixes, &add_hashes, &sub_hashes, in TEST()
123 EXPECT_TRUE(add_prefixes.empty()); in TEST()
146 std::vector<SBAddPrefix> add_prefixes; in TEST() local
153 add_prefixes.push_back(SBAddPrefix(kAddChunk1, kHash1.prefix)); in TEST()
162 add_prefixes.push_back(SBAddPrefix(kAddChunk1, kHash2.prefix)); in TEST()
169 SBProcessSubs(&add_prefixes, &sub_prefixes, &add_hashes, &sub_hashes, in TEST()
172 EXPECT_EQ(1U, add_prefixes.size()); in TEST()
173 EXPECT_EQ(kAddChunk1, add_prefixes[0].chunk_id); in TEST()
174 EXPECT_EQ(kHash2.prefix, add_prefixes[0].prefix); in TEST()
[all …]
Dsafe_browsing_store.cc134 void SBCheckPrefixMisses(const std::vector<SBAddPrefix>& add_prefixes, in SBCheckPrefixMisses() argument
151 for (size_t i = 0; i < add_prefixes.size(); ++i) { in SBCheckPrefixMisses()
153 false_misses.erase(add_prefixes[i].prefix); in SBCheckPrefixMisses()
167 void SBProcessSubs(std::vector<SBAddPrefix>* add_prefixes, in SBProcessSubs() argument
179 std::sort(add_prefixes->begin(), add_prefixes->end(), in SBProcessSubs()
190 KnockoutSubs(sub_prefixes, add_prefixes, in SBProcessSubs()
221 RemoveDeleted(add_prefixes, add_chunks_deleted); in SBProcessSubs()
Dsafe_browsing_store_file.cc288 std::vector<SBAddPrefix>* add_prefixes) { in GetAddPrefixes() argument
289 add_prefixes->clear(); in GetAddPrefixes()
303 if (!ReadToVector(add_prefixes, header.add_prefix_count, file.get(), NULL)) in GetAddPrefixes()
484 std::vector<SBAddPrefix> add_prefixes; in DoUpdate() local
513 if (!ReadToVector(&add_prefixes, header.add_prefix_count, in DoUpdate()
583 if (!ReadToVector(&add_prefixes, header.add_prefix_count, in DoUpdate()
600 SBCheckPrefixMisses(add_prefixes, prefix_misses); in DoUpdate()
603 SBProcessSubs(&add_prefixes, &sub_prefixes, in DoUpdate()
624 header.add_prefix_count = add_prefixes.size(); in DoUpdate()
634 !WriteVector(add_prefixes, new_file_.get(), &context) || in DoUpdate()
[all …]
Dsafe_browsing_database.cc259 const std::vector<SBAddPrefix>& add_prefixes) { in PrefixSetFromAddPrefixes() argument
265 for (size_t i = 0; i < add_prefixes.size(); ++i) { in PrefixSetFromAddPrefixes()
266 prefixes.push_back(add_prefixes[i].prefix); in PrefixSetFromAddPrefixes()
664 std::vector<SBAddPrefix> add_prefixes; in MatchDownloadAddPrefixes() local
665 download_store_->GetAddPrefixes(&add_prefixes); in MatchDownloadAddPrefixes()
666 for (size_t i = 0; i < add_prefixes.size(); ++i) { in MatchDownloadAddPrefixes()
669 if (prefix == add_prefixes[i].prefix && in MatchDownloadAddPrefixes()
670 GetListIdBit(add_prefixes[i].chunk_id) == list_bit) { in MatchDownloadAddPrefixes()
1117 std::vector<SBAddPrefix> add_prefixes; in UpdateBrowseStore() local
1120 &add_prefixes, &add_full_hashes)) { in UpdateBrowseStore()
[all …]
Dsafe_browsing_store_file_unittest.cc124 std::vector<SBAddPrefix> add_prefixes; in TEST_F() local
129 &add_prefixes, &add_hashes)); in TEST_F()
131 EXPECT_EQ(add_prefixes.size(), 0U); in TEST_F()
Dsafe_browsing_store.h142 void SBProcessSubs(std::vector<SBAddPrefix>* add_prefixes,
151 void SBCheckPrefixMisses(const std::vector<SBAddPrefix>& add_prefixes,
178 virtual bool GetAddPrefixes(std::vector<SBAddPrefix>* add_prefixes) = 0;
Dsafe_browsing_store_file.h120 virtual bool GetAddPrefixes(std::vector<SBAddPrefix>* add_prefixes);