#include "components/fingerprinting_protection_filter/renderer/renderer_url_loader_throttle.h"
#include "base/check_op.h"
#include "base/functional/bind.h"
#include "base/task/sequenced_task_runner.h"
#include "base/types/optional_ref.h"
#include "components/fingerprinting_protection_filter/renderer/renderer_agent.h"
#include "components/subresource_filter/core/mojom/subresource_filter.mojom.h"
#include "content/public/common/url_constants.h"
#include "net/base/net_errors.h"
#include "net/url_request/redirect_info.h"
#include "services/network/public/cpp/resource_request.h"
#include "services/network/public/mojom/fetch_api.mojom.h"
#include "services/network/public/mojom/url_response_head.mojom.h"
#include "third_party/blink/public/common/tokens/tokens.h"
#include "third_party/blink/public/platform/web_document_subresource_filter.h"
#include "third_party/blink/public/web/web_local_frame.h"
#include "url/gurl.h"
#include "url/origin.h"
namespace fingerprinting_protection_filter {
namespace {
ActivationLevel;
}
RendererURLLoaderThrottle::RendererURLLoaderThrottle(
RendererAgent* renderer_agent,
base::optional_ref<const blink::LocalFrameToken> local_frame_token)
: … { … }
RendererURLLoaderThrottle::~RendererURLLoaderThrottle() { … }
bool RendererURLLoaderThrottle::WillIgnoreRequest(
const GURL& url,
network::mojom::RequestDestination request_destination) { … }
bool RendererURLLoaderThrottle::ShouldAllowRequest() { … }
void RendererURLLoaderThrottle::CheckCurrentResourceRequest() { … }
void RendererURLLoaderThrottle::ProcessRequestStep(const GURL& latest_url,
bool* defer) { … }
void RendererURLLoaderThrottle::DetachFromCurrentSequence() { … }
void RendererURLLoaderThrottle::WillStartRequest(
network::ResourceRequest* request,
bool* defer) { … }
void RendererURLLoaderThrottle::WillRedirectRequest(
net::RedirectInfo* redirect_info,
const network::mojom::URLResponseHead& response_head,
bool* defer,
std::vector<std::string>* to_be_removed_headers,
net::HttpRequestHeaders* modified_headers,
net::HttpRequestHeaders* modified_cors_exempt_headers) { … }
void RendererURLLoaderThrottle::WillProcessResponse(
const GURL& response_url,
network::mojom::URLResponseHead* response_head,
bool* defer) { … }
const char* RendererURLLoaderThrottle::NameForLoggingWillProcessResponse() { … }
void RendererURLLoaderThrottle::OnActivationComputed(
const subresource_filter::mojom::ActivationState& activation_state) { … }
}