Move SafeBrowsing V4 Caching to V4GetHashProtocolManager. It is currently in the SafeBrowsingDatabaseManager but does not need to be exposed there.
Taking over the bug since I am re-designing the cache and moving it into V4GetHashProtocolManager.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1d2b239717bd198bd42f11e468e1eaca6b94cdc1 commit 1d2b239717bd198bd42f11e468e1eaca6b94cdc1 Author: vakh <vakh@chromium.org> Date: Tue Sep 13 18:23:51 2016 Move the logic to cache the full hash responses from the server into v4_get_hash_protocol_manager. Design doc: https://goto.google.com/design-doc-v4-full-hash-manager Overall, this CL does the following: 1. Moves caching to V4GetHashProtocolManager. 2. Refactors V4GetHashProtocolManager to use the data structures used in rest of the V4 code. 3. Re-defines how cache is implemented. TODOs: 1. Done: Merge the response from the server and the response from the cache. 2. Figure out what UMA metrics to add (I have removed some that are no longer valid after the refactor). BUG= 616647 , 543161 Review-Url: https://codereview.chromium.org/2233103002 Cr-Commit-Position: refs/heads/master@{#418303} [modify] https://crrev.com/1d2b239717bd198bd42f11e468e1eaca6b94cdc1/components/safe_browsing_db/BUILD.gn [modify] https://crrev.com/1d2b239717bd198bd42f11e468e1eaca6b94cdc1/components/safe_browsing_db/database_manager.cc [modify] https://crrev.com/1d2b239717bd198bd42f11e468e1eaca6b94cdc1/components/safe_browsing_db/database_manager.h [modify] https://crrev.com/1d2b239717bd198bd42f11e468e1eaca6b94cdc1/components/safe_browsing_db/database_manager_unittest.cc [modify] https://crrev.com/1d2b239717bd198bd42f11e468e1eaca6b94cdc1/components/safe_browsing_db/testing_util.h [modify] https://crrev.com/1d2b239717bd198bd42f11e468e1eaca6b94cdc1/components/safe_browsing_db/util.cc [modify] https://crrev.com/1d2b239717bd198bd42f11e468e1eaca6b94cdc1/components/safe_browsing_db/util.h [modify] https://crrev.com/1d2b239717bd198bd42f11e468e1eaca6b94cdc1/components/safe_browsing_db/v4_database.cc [modify] https://crrev.com/1d2b239717bd198bd42f11e468e1eaca6b94cdc1/components/safe_browsing_db/v4_database.h [modify] https://crrev.com/1d2b239717bd198bd42f11e468e1eaca6b94cdc1/components/safe_browsing_db/v4_database_unittest.cc [modify] https://crrev.com/1d2b239717bd198bd42f11e468e1eaca6b94cdc1/components/safe_browsing_db/v4_get_hash_protocol_manager.cc [modify] https://crrev.com/1d2b239717bd198bd42f11e468e1eaca6b94cdc1/components/safe_browsing_db/v4_get_hash_protocol_manager.h [modify] https://crrev.com/1d2b239717bd198bd42f11e468e1eaca6b94cdc1/components/safe_browsing_db/v4_get_hash_protocol_manager_unittest.cc [modify] https://crrev.com/1d2b239717bd198bd42f11e468e1eaca6b94cdc1/components/safe_browsing_db/v4_local_database_manager.cc [modify] https://crrev.com/1d2b239717bd198bd42f11e468e1eaca6b94cdc1/components/safe_browsing_db/v4_local_database_manager.h [modify] https://crrev.com/1d2b239717bd198bd42f11e468e1eaca6b94cdc1/components/safe_browsing_db/v4_local_database_manager_unittest.cc [modify] https://crrev.com/1d2b239717bd198bd42f11e468e1eaca6b94cdc1/components/safe_browsing_db/v4_protocol_manager_util.cc [modify] https://crrev.com/1d2b239717bd198bd42f11e468e1eaca6b94cdc1/components/safe_browsing_db/v4_protocol_manager_util.h [modify] https://crrev.com/1d2b239717bd198bd42f11e468e1eaca6b94cdc1/components/safe_browsing_db/v4_store.cc [modify] https://crrev.com/1d2b239717bd198bd42f11e468e1eaca6b94cdc1/components/safe_browsing_db/v4_store.h [modify] https://crrev.com/1d2b239717bd198bd42f11e468e1eaca6b94cdc1/tools/metrics/histograms/histograms.xml
Comment 1 by vakh@chromium.org
, Jun 3 2016