chromium/components/subresource_filter/content/browser/safe_browsing_child_navigation_throttle.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 COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_SAFE_BROWSING_CHILD_NAVIGATION_THROTTLE_H_
#define COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_SAFE_BROWSING_CHILD_NAVIGATION_THROTTLE_H_

#include <optional>

#include "base/functional/callback.h"
#include "base/memory/weak_ptr.h"
#include "components/subresource_filter/content/shared/browser/child_frame_navigation_filtering_throttle.h"
#include "third_party/blink/public/common/frame/frame_ad_evidence.h"

class GURL;

namespace content {
class NavigationThrottle;
}
namespace subresource_filter {

class AsyncDocumentSubresourceFilter;

// ChildFrameNavigationFilteringThrottle implementation for Safe Browsing.
//
// TODO(https://crbug.com/41471110): With AdTagging enabled, this throttle
// delays almost all child frame navigations. This delay is necessary in
// blocking mode due to logic related to BLOCK_REQUEST_AND_COLLAPSE. However,
// there may be room for optimization during AdTagging, or migrating
// BLOCK_REQUEST_AND_COLLAPSE to be allowed during WillProcessResponse.
class SafeBrowsingChildNavigationThrottle
    : public ChildFrameNavigationFilteringThrottle {};

}  // namespace subresource_filter

#endif  // COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_SAFE_BROWSING_CHILD_NAVIGATION_THROTTLE_H_