Index: components/safe_browsing_db/v4_local_database_manager.h |
diff --git a/components/safe_browsing_db/v4_local_database_manager.h b/components/safe_browsing_db/v4_local_database_manager.h |
index 7fa07fbee4ca5dc95e1ca20b5274d8fede38b3e5..0b4b7fe2b460a67cc92db209fcc6e11ab16bd4c1 100644 |
--- a/components/safe_browsing_db/v4_local_database_manager.h |
+++ b/components/safe_browsing_db/v4_local_database_manager.h |
@@ -10,17 +10,20 @@ |
#include <memory> |
+#include "base/sequenced_task_runner.h" |
#include "components/safe_browsing_db/database_manager.h" |
#include "components/safe_browsing_db/hit_report.h" |
#include "components/safe_browsing_db/v4_database.h" |
#include "components/safe_browsing_db/v4_protocol_manager_util.h" |
-#include "components/safe_browsing_db/v4_update_protocol_manager.h" |
#include "url/gurl.h" |
using content::ResourceType; |
namespace safe_browsing { |
+class V4GetHashProtocolManager; |
+class V4UpdateProtocolManager; |
+ |
// Manages the local, on-disk database of updates downloaded from the |
// SafeBrowsing service and interfaces with the protocol manager. |
class V4LocalDatabaseManager : public SafeBrowsingDatabaseManager { |
@@ -66,11 +69,20 @@ class V4LocalDatabaseManager : public SafeBrowsingDatabaseManager { |
~V4LocalDatabaseManager() override; |
+ // Called back by V4GetHashProtocolManager when the full hashes response has |
+ // been received from the server. |
+ void HandleGetHashes(const std::vector<SBFullHashResult>& full_hash_results, |
+ const base::Time& negative_cache_expire); |
+ |
// The callback called each time the protocol manager downloads updates |
// successfully. |
void UpdateRequestCompleted( |
std::unique_ptr<ParsedServerResponse> parsed_server_response); |
+ void SetupGetHashProtocolManager( |
+ net::URLRequestContextGetter* request_context_getter, |
+ const V4ProtocolConfig& config); |
+ |
void SetupUpdateProtocolManager( |
net::URLRequestContextGetter* request_context_getter, |
const V4ProtocolConfig& config); |
@@ -94,6 +106,10 @@ class V4LocalDatabaseManager : public SafeBrowsingDatabaseManager { |
// It should come through the database, from the various V4Stores. |
base::hash_map<UpdateListIdentifier, std::string> current_list_states_; |
+ // The protocol manager that downloads the full hashes for given hash |
+ // prefixes. |
+ std::unique_ptr<V4GetHashProtocolManager> v4_get_hash_protocol_manager_; |
+ |
// The protocol manager that downloads the hash prefix updates. |
std::unique_ptr<V4UpdateProtocolManager> v4_update_protocol_manager_; |