/external/chromium/chrome/browser/safe_browsing/ |
D | safe_browsing_util.h | 34 union SBFullHash { union 39 inline bool operator==(const SBFullHash& lhash, const SBFullHash& rhash) { 40 return memcmp(lhash.full_hash, rhash.full_hash, sizeof(SBFullHash)) == 0; 43 inline bool operator<(const SBFullHash& lhash, const SBFullHash& rhash) { 44 return memcmp(lhash.full_hash, rhash.full_hash, sizeof(SBFullHash)) < 0; 108 SBFullHash hash; 181 return IsPrefix() ? sizeof(SBPrefix) : sizeof(SBFullHash); in HashLen() 194 const SBFullHash& FullHashAt(int index) const; 199 void SetFullHashAt(int index, const SBFullHash& full_hash); 211 SBFullHash prefix; [all …]
|
D | safe_browsing_store_unittest.cc | 28 SBFullHash one, onetwo, two; in TEST() 79 SBFullHash one, onetwo, two; in TEST() 132 const SBFullHash kHash1(SBFullHashFromString("one")); in TEST() 133 const SBFullHash kHash2(SBFullHashFromString("two")); in TEST() 134 const SBFullHash kHash3(SBFullHashFromString("three")); in TEST() 139 SBFullHash kHash1mod1 = kHash1; in TEST() 141 SBFullHash kHash1mod2 = kHash1mod1; in TEST() 143 SBFullHash kHash1mod3 = kHash1mod2; in TEST() 195 const SBFullHash kHash1(SBFullHashFromString("one")); in TEST() 196 const SBFullHash kHash2(SBFullHashFromString("two")); in TEST() [all …]
|
D | safe_browsing_store_unittest_helper.h | 18 inline const SBFullHash SBFullHashFromString(const char* str) { in SBFullHashFromString() 19 SBFullHash h; in SBFullHashFromString() 26 inline bool SBFullHashEq(const SBFullHash& a, const SBFullHash& b) { in SBFullHashEq()
|
D | safe_browsing_store.h | 71 SBFullHash full_hash; 73 SBAddFullHash(int32 id, base::Time r, const SBFullHash& h) in SBAddFullHash() 81 SBAddFullHash(int32 id, int32 r, const SBFullHash& h) in SBAddFullHash() 93 SBFullHash full_hash; 95 SBSubFullHash(int32 id, int32 add_id, const SBFullHash& h) in SBSubFullHash() 199 const SBFullHash& full_hash) = 0; 203 const SBFullHash& full_hash) = 0;
|
D | protocol_parser.cc | 106 DCHECK(static_cast<size_t>(full_hash_len) >= sizeof(SBFullHash)); in ParseGetHash() 107 memcpy(&full_hash.hash, data, sizeof(SBFullHash)); in ParseGetHash() 109 data += sizeof(SBFullHash); in ParseGetHash() 110 length -= sizeof(SBFullHash); in ParseGetHash() 111 full_hash_len -= sizeof(SBFullHash); in ParseGetHash() 291 if (hash_len != sizeof(SBPrefix) && hash_len != sizeof(SBFullHash)) { in ParseChunk() 446 entry->SetFullHashAt(i, *reinterpret_cast<const SBFullHash*>(*data)); in ReadPrefixes()
|
D | safe_browsing_util.cc | 94 return sizeof(SBFullHash); in PrefixSize() 136 const SBFullHash& SBEntry::FullHashAt(int index) const { in FullHashAt() 151 void SBEntry::SetFullHashAt(int index, const SBFullHash& full_hash) { in SetFullHashAt() 418 int GetHashIndex(const SBFullHash& hash, in GetHashIndex() 438 SBFullHash key; in GetUrlHashIndex() 441 sizeof(SBFullHash)); in GetUrlHashIndex() 522 void StringToSBFullHash(const std::string& hash_in, SBFullHash* hash_out) { in StringToSBFullHash() 527 std::string SBFullHashToString(const SBFullHash& hash) { in SBFullHashToString()
|
D | protocol_parser_unittest.cc | 61 SBFullHash full_hash1, full_hash2; in TEST() 297 SBFullHash full_hash1, full_hash2; in TEST() 486 sizeof(SBFullHash)), 0); in TEST() 490 sizeof(SBFullHash)), 0); in TEST() 494 sizeof(SBFullHash)), 0); in TEST() 512 sizeof(SBFullHash)), 0); in TEST() 516 sizeof(SBFullHash)), 0); in TEST() 520 sizeof(SBFullHash)), 0); in TEST() 557 EXPECT_EQ(memcmp(hash_result, &full_hashes[0].hash, sizeof(SBFullHash)), 0); in TEST() 577 &full_hashes[0].hash, sizeof(SBFullHash)), 0); in TEST() [all …]
|
D | safe_browsing_util_unittest.cc | 288 sizeof(SBFullHash)); in TEST() 341 SBFullHash hash_out; in TEST() 344 EXPECT_EQ(0, memcmp(hash_in.data(), hash_out.full_hash, sizeof(SBFullHash))); in TEST()
|
D | safe_browsing_store_unittest_helper.cc | 20 const SBFullHash kHash1 = SBFullHashFromString("one"); 21 const SBFullHash kHash2 = SBFullHashFromString("two"); 22 const SBFullHash kHash3 = SBFullHashFromString("three"); 23 const SBFullHash kHash4 = SBFullHashFromString("four"); 24 const SBFullHash kHash5 = SBFullHashFromString("five");
|
D | safe_browsing_database.cc | 78 std::vector<SBFullHash>* full_hashes) { in BrowseFullHashesToCheck() 92 SBFullHash full_hash; in BrowseFullHashesToCheck() 114 std::vector<SBFullHash> full_hashes; in GetDownloadUrlPrefixes() 590 std::vector<SBFullHash> full_hashes; in ContainsBrowseUrl() 717 std::vector<SBFullHash> full_hashes; in ContainsCsdWhitelistedUrl() 719 for (std::vector<SBFullHash>::const_iterator it = full_hashes.begin(); in ContainsCsdWhitelistedUrl() 756 const SBFullHash full_hash = entry->FullHashAt(i); in InsertAdd() 829 const SBFullHash full_hash = entry->FullHashAt(i); in InsertSub() 1298 std::vector<SBFullHash> new_csd_whitelist; in LoadCsdWhitelist() 1305 SBFullHash kill_switch; in LoadCsdWhitelist()
|
D | safe_browsing_store_file.h | 128 const SBFullHash& full_hash); 132 const SBFullHash& full_hash);
|
D | safe_browsing_database.h | 307 std::vector<SBFullHash> csd_whitelist_;
|
D | safe_browsing_service_browsertest.cc | 267 sizeof(SBFullHash)); in GenUrlFullhashResult() 330 SBFullHash full_hash; in SetupResponseForDigest()
|
D | safe_browsing_service.h | 79 scoped_ptr<SBFullHash> full_hash;
|
D | safe_browsing_store_file.cc | 336 const SBFullHash& full_hash) { in WriteAddHash() 349 const SBFullHash& full_hash) { in WriteSubHash()
|
D | safe_browsing_database_unittest.cc | 33 SBFullHash Sha256Hash(const std::string& str) { in Sha256Hash() 34 SBFullHash hash; in Sha256Hash()
|
D | safe_browsing_service.cc | 236 check->full_hash.reset(new SBFullHash); in CheckDownloadHash()
|