/external/chromium/chrome/browser/safe_browsing/ |
D | prefix_set_unittest.cc | 33 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 …]
|
D | safe_browsing_database.h | 89 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 …]
|
D | safe_browsing_store.h | 46 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 …]
|
D | protocol_parser.cc | 119 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 …]
|
D | prefix_set.h | 63 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_;
|
D | prefix_set.cc | 33 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 …]
|
D | filter_false_positive_perftest.cc | 105 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 …]
|
D | safe_browsing_util.h | 24 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];
|
D | bloom_filter_unittest.cc | 23 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()
|
D | safe_browsing_database.cc | 113 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 …]
|
D | safe_browsing_service_browsertest.cc | 51 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 …]
|
D | safe_browsing_store_file.h | 125 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,
|
D | bloom_filter.h | 42 void Insert(SBPrefix hash); 43 bool Exists(SBPrefix hash) const;
|
D | protocol_parser.h | 95 void FormatGetHash(const std::vector<SBPrefix>& prefixes, 120 SBPrefix* host,
|
D | safe_browsing_database_unittest.cc | 27 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 …]
|
D | safe_browsing_store_unittest_helper.cc | 47 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()
|
D | safe_browsing_service.h | 86 std::vector<SBPrefix> prefix_hits; 271 typedef base::hash_map<SBPrefix, GetHashRequestors> GetHashRequests; 352 void CacheHashResults(const std::vector<SBPrefix>& prefixes,
|
D | safe_browsing_store.cc | 135 const std::set<SBPrefix>& prefix_misses) { in SBCheckPrefixMisses() 150 std::set<SBPrefix> false_misses(prefix_misses.begin(), prefix_misses.end()); in SBCheckPrefixMisses()
|
D | bloom_filter.cc | 71 void BloomFilter::Insert(SBPrefix hash) { in Insert() 79 bool BloomFilter::Exists(SBPrefix hash) const { in Exists()
|
D | safe_browsing_store_file.cc | 282 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()
|
D | safe_browsing_service.cc | 280 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()
|
D | safe_browsing_util.cc | 92 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()
|
D | safe_browsing_store_file_unittest.cc | 101 std::set<SBPrefix> prefix_misses; in TEST_F()
|
D | protocol_manager.h | 116 const std::vector<SBPrefix>& prefixes);
|
D | protocol_manager.cc | 159 const std::vector<SBPrefix>& prefixes) { in GetFullHash()
|