chromium/chrome/browser/predictors/lcp_critical_path_predictor/prewarm_http_disk_cache_manager.h

// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_PREDICTORS_LCP_CRITICAL_PATH_PREDICTOR_PREWARM_HTTP_DISK_CACHE_MANAGER_H_
#define CHROME_BROWSER_PREDICTORS_LCP_CRITICAL_PATH_PREDICTOR_PREWARM_HTTP_DISK_CACHE_MANAGER_H_

#include <queue>
#include <tuple>

#include "base/containers/lru_cache.h"
#include "base/memory/weak_ptr.h"
#include "chrome/browser/profiles/profile.h"
#include "net/base/isolation_info.h"
#include "services/network/public/cpp/simple_url_loader.h"
#include "services/network/public/cpp/simple_url_loader_stream_consumer.h"
#include "url/gurl.h"
#include "url/origin.h"

namespace net {
class HttpResponseHeaders;
}

namespace predictors {

// PrewarmHttpDiskCacheManager prewarms the HTTP disk cache.
//
// - Only warms up the HTTP disk cache entries for the given URL.
// - Does not go to the network.
// - Processes the requested URLs sequentially to avoid heavy load.
// - Runs on UI thread in an asynchronous manner.
// - Only supports the top frame's resources.
class PrewarmHttpDiskCacheManager
    : public network::SimpleURLLoaderStreamConsumer {};

}  // namespace predictors

#endif  // CHROME_BROWSER_PREDICTORS_LCP_CRITICAL_PATH_PREDICTOR_PREWARM_HTTP_DISK_CACHE_MANAGER_H_