#include "content/public/test/url_loader_monitor.h"
#include <map>
#include <memory>
#include <optional>
#include <set>
#include "base/functional/callback.h"
#include "base/run_loop.h"
#include "base/synchronization/lock.h"
#include "base/thread_annotations.h"
#include "content/public/test/url_loader_interceptor.h"
#include "services/network/public/cpp/resource_request.h"
#include "services/network/public/mojom/url_loader_completion_status.mojom.h"
#include "url/gurl.h"
namespace content {
URLLoaderMonitor::URLLoaderMonitor(std::set<GURL> urls_to_wait_for_request)
: … { … }
URLLoaderMonitor::~URLLoaderMonitor() { … }
std::optional<network::ResourceRequest> URLLoaderMonitor::GetRequestInfo(
const GURL& url) { … }
std::optional<network::URLLoaderCompletionStatus>
URLLoaderMonitor::GetCompletionStatus(const GURL& url) { … }
const network::ResourceRequest& URLLoaderMonitor::WaitForUrl(
const GURL& url_to_wait_for_request) { … }
void URLLoaderMonitor::WaitForUrls(
const std::set<GURL>& urls_to_wait_for_request) { … }
const network::URLLoaderCompletionStatus&
URLLoaderMonitor::WaitForRequestCompletion(
const GURL& url_to_wait_for_completion) { … }
void URLLoaderMonitor::WaitForRequestCompletion(
const std::set<GURL>& urls_to_wait_for_completion) { … }
void URLLoaderMonitor::ClearRequests() { … }
bool URLLoaderMonitor::OnRequest(
content::URLLoaderInterceptor::RequestParams* params) { … }
void URLLoaderMonitor::OnRequestComplete(
const GURL& request_url,
const network::URLLoaderCompletionStatus& status) { … }
}