#include "chrome/browser/predictors/lcp_critical_path_predictor/prewarm_http_disk_cache_manager.h"
#include <tuple>
#include "base/functional/bind.h"
#include "base/metrics/histogram_functions.h"
#include "base/notreached.h"
#include "base/task/sequenced_task_runner.h"
#include "base/trace_event/base_tracing.h"
#include "base/trace_event/common/trace_event_common.h"
#include "chrome/browser/after_startup_task_utils.h"
#include "content/public/browser/browser_thread.h"
#include "net/base/isolation_info.h"
#include "net/base/load_flags.h"
#include "services/network/public/cpp/resource_request.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
#include "third_party/blink/public/common/features.h"
namespace predictors {
namespace {
constexpr net::NetworkTrafficAnnotationTag kTrafficAnnotation = …;
}
PrewarmHttpDiskCacheManager::PrewarmHttpDiskCacheManager(
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory)
: … { … }
PrewarmHttpDiskCacheManager::~PrewarmHttpDiskCacheManager() { … }
void PrewarmHttpDiskCacheManager::MaybePrewarmResources(
const GURL& top_frame_main_resource_url,
const std::vector<GURL>& top_frame_subresource_urls) { … }
void PrewarmHttpDiskCacheManager::MaybeAddPrewarmJob(
const url::Origin& top_frame_origin,
const GURL& url,
net::IsolationInfo::RequestType request_type) { … }
void PrewarmHttpDiskCacheManager::MaybeProcessNextQueuedJob() { … }
void PrewarmHttpDiskCacheManager::OnDataReceived(std::string_view string_piece,
base::OnceClosure resume) { … }
void PrewarmHttpDiskCacheManager::OnComplete(bool success) { … }
void PrewarmHttpDiskCacheManager::OnRetry(base::OnceClosure start_retry) { … }
void PrewarmHttpDiskCacheManager::OnHeadersOnly(
scoped_refptr<net::HttpResponseHeaders> headers) { … }
void PrewarmHttpDiskCacheManager::DoComplete() { … }
}