Chromium Code Reviews| Index: components/safe_browsing_db/v4_database.h |
| diff --git a/components/safe_browsing_db/v4_database.h b/components/safe_browsing_db/v4_database.h |
| index df458a24809361098e9c019bec5a62e4958efe9a..d5033b787638650acafcb73f21a62aaca45949b5 100644 |
| --- a/components/safe_browsing_db/v4_database.h |
| +++ b/components/safe_browsing_db/v4_database.h |
| @@ -30,6 +30,9 @@ typedef base::Callback<void()> DatabaseUpdatedCallback; |
| // as manage their storage on disk. |
| typedef base::hash_map<UpdateListIdentifier, std::unique_ptr<V4Store>> StoreMap; |
| +// The list of stores that had a hash prefix matching the given full hash. |
| +typedef std::vector<UpdateListIdentifier> StoresMatched; |
|
Nathan Parker
2016/07/19 23:05:56
A thought: It might be easier to read to not typed
vakh (use Gerrit instead)
2016/07/20 00:07:43
Now that it is a map of store identifiers to the m
|
| + |
| // Factory for creating V4Database. Tests implement this factory to create fake |
| // databases for testing. |
| class V4DatabaseFactory { |
| @@ -74,6 +77,9 @@ class V4Database { |
| // Returns the current state of each of the stores being managed. |
| std::unique_ptr<StoreStateMap> GetStoreStateMap(); |
| + void GetStoresMatchingFullHash(const FullHash& full_hash, |
| + StoresMatched* stores_matched); |
| + |
| // Deletes the current database and creates a new one. |
| virtual bool ResetDatabase(); |
| @@ -90,6 +96,7 @@ class V4Database { |
| FRIEND_TEST_ALL_PREFIXES(V4DatabaseTest, TestApplyUpdateWithNoNewState); |
| FRIEND_TEST_ALL_PREFIXES(V4DatabaseTest, TestApplyUpdateWithEmptyUpdate); |
| FRIEND_TEST_ALL_PREFIXES(V4DatabaseTest, TestApplyUpdateWithInvalidUpdate); |
| + FRIEND_TEST_ALL_PREFIXES(V4DatabaseTest, TestSomeStoresMatchFullHash); |
| // Makes the passed |factory| the factory used to instantiate a V4Store. Only |
| // for tests. |