#include "components/safe_browsing/content/browser/threat_details_cache.h"
#include <stdint.h>
#include "base/functional/bind.h"
#include "base/hash/md5.h"
#include "base/lazy_instance.h"
#include "base/strings/string_util.h"
#include "components/safe_browsing/content/browser/threat_details.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "net/base/ip_endpoint.h"
#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
#include "net/base/proxy_chain.h"
#include "net/http/http_response_headers.h"
#include "net/traffic_annotation/network_traffic_annotation.h"
#include "services/network/public/cpp/resource_request.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
#include "services/network/public/cpp/simple_url_loader.h"
#include "services/network/public/mojom/url_response_head.mojom.h"
BrowserThread;
static const uint32_t kMaxBodySizeBytes = …;
namespace safe_browsing {
ThreatDetailsCacheCollector::ThreatDetailsCacheCollector()
: … { … }
void ThreatDetailsCacheCollector::StartCacheCollection(
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
ResourceMap* resources,
bool* result,
base::OnceClosure callback) { … }
bool ThreatDetailsCacheCollector::HasStarted() { … }
ThreatDetailsCacheCollector::~ThreatDetailsCacheCollector() { … }
void ThreatDetailsCacheCollector::OpenEntry() { … }
ClientSafeBrowsingReportRequest::Resource*
ThreatDetailsCacheCollector::GetResource(const GURL& url) { … }
void ThreatDetailsCacheCollector::OnURLLoaderComplete(
std::unique_ptr<std::string> response_body) { … }
void ThreatDetailsCacheCollector::ReadResponse(
ClientSafeBrowsingReportRequest::Resource* pb_resource) { … }
void ThreatDetailsCacheCollector::ReadData(
ClientSafeBrowsingReportRequest::Resource* pb_resource,
const std::string& data) { … }
void ThreatDetailsCacheCollector::AdvanceEntry() { … }
void ThreatDetailsCacheCollector::AllDone(bool success) { … }
}