#include "components/safe_browsing/core/browser/db/database_manager.h"
#include <memory>
#include <utility>
#include "base/functional/bind.h"
#include "base/metrics/histogram_macros.h"
#include "base/task/sequenced_task_runner.h"
#include "components/safe_browsing/core/browser/db/v4_get_hash_protocol_manager.h"
#include "components/safe_browsing/core/browser/db/v4_protocol_manager_util.h"
#include "components/safe_browsing/core/common/features.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
#include "url/gurl.h"
namespace safe_browsing {
SafeBrowsingDatabaseManager::Client::Client() = default;
SafeBrowsingDatabaseManager::Client::~Client() = default;
base::WeakPtr<SafeBrowsingDatabaseManager::Client>
SafeBrowsingDatabaseManager::Client::GetWeakPtr() { … }
SafeBrowsingDatabaseManager::SafeBrowsingDatabaseManager(
scoped_refptr<base::SequencedTaskRunner> ui_task_runner)
: … { … }
SafeBrowsingDatabaseManager::~SafeBrowsingDatabaseManager() { … }
bool SafeBrowsingDatabaseManager::CancelApiCheck(Client* client) { … }
bool SafeBrowsingDatabaseManager::CheckApiBlocklistUrl(const GURL& url,
Client* client) { … }
SafeBrowsingDatabaseManager::ApiCheckSet::iterator
SafeBrowsingDatabaseManager::FindClientApiCheck(Client* client) { … }
StoresToCheck SafeBrowsingDatabaseManager::GetStoresForFullHashRequests() { … }
std::unique_ptr<StoreStateMap> SafeBrowsingDatabaseManager::GetStoreStateMap() { … }
void SafeBrowsingDatabaseManager::OnThreatMetadataResponse(
std::unique_ptr<SafeBrowsingApiCheck> check,
const ThreatMetadata& md) { … }
void SafeBrowsingDatabaseManager::StartOnUIThread(
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
const V4ProtocolConfig& config) { … }
void SafeBrowsingDatabaseManager::StopOnUIThread(bool shutdown) { … }
base::CallbackListSubscription
SafeBrowsingDatabaseManager::RegisterDatabaseUpdatedCallback(
const OnDatabaseUpdated& cb) { … }
void SafeBrowsingDatabaseManager::NotifyDatabaseUpdateFinished() { … }
SafeBrowsingDatabaseManager::SafeBrowsingApiCheck::SafeBrowsingApiCheck(
const GURL& url,
Client* client)
: … { … }
}