Chromium Code Reviews| Index: components/safe_browsing_db/v4_database.cc |
| diff --git a/components/safe_browsing_db/v4_database.cc b/components/safe_browsing_db/v4_database.cc |
| index 3c1cf1c51a64a8a85df58616ccd8e5c6a0e781db..f29a63b49e775f9bcebe20d37fe90384b8412073 100644 |
| --- a/components/safe_browsing_db/v4_database.cc |
| +++ b/components/safe_browsing_db/v4_database.cc |
| @@ -168,4 +168,18 @@ std::unique_ptr<StoreStateMap> V4Database::GetStoreStateMap() { |
| return store_state_map; |
| } |
| +void V4Database::GetStoresMatchingFullHash(const FullHash& full_hash, |
|
Nathan Parker
2016/07/19 23:05:56
What's the usecase for this function? I think the
vakh (use Gerrit instead)
2016/07/20 00:07:43
Done.
The goal of this method is to identify the
|
| + StoresMatched* stores_matched) { |
| + DCHECK(stores_matched); |
| + for (const auto& store_pair : *store_map_) { |
| + const UpdateListIdentifier& identifier = store_pair.first; |
| + const std::unique_ptr<V4Store>& store = store_pair.second; |
| + |
| + HashPrefix hash_prefix = store->GetMatchingHashPrefix(full_hash); |
| + if (!hash_prefix.empty()) { |
| + stores_matched->push_back(identifier); |
| + } |
| + } |
| +} |
| + |
| } // namespace safe_browsing |