chromium/components/safe_browsing/content/browser/url_checker_holder.cc

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

#include "components/safe_browsing/content/browser/url_checker_holder.h"

#include "base/check_op.h"
#include "base/functional/bind.h"
#include "base/memory/ptr_util.h"
#include "base/memory/scoped_refptr.h"
#include "base/metrics/histogram_functions.h"
#include "components/safe_browsing/content/browser/web_ui/safe_browsing_ui.h"
#include "components/safe_browsing/core/browser/hashprefix_realtime/hash_realtime_service.h"
#include "components/safe_browsing/core/browser/realtime/url_lookup_service_base.h"
#include "components/safe_browsing/core/browser/safe_browsing_url_checker_impl.h"
#include "components/safe_browsing/core/browser/url_checker_delegate.h"
#include "components/safe_browsing/core/common/features.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/web_contents.h"
#include "net/base/load_flags.h"
#include "services/network/public/mojom/url_response_head.mojom.h"

namespace safe_browsing {

UrlCheckerHolder::OnCompleteCheckResult::OnCompleteCheckResult(
    bool proceed,
    bool showed_interstitial,
    bool has_post_commit_interstitial_skipped,
    SafeBrowsingUrlCheckerImpl::PerformedCheck performed_check,
    bool all_checks_completed)
    :{}

UrlCheckerHolder::StartParams::StartParams(
    net::HttpRequestHeaders headers,
    int load_flags,
    bool has_user_gesture,
    GURL url,
    std::string method)
    :{}

UrlCheckerHolder::StartParams::StartParams(const StartParams& other) = default;

UrlCheckerHolder::StartParams::~StartParams() = default;

UrlCheckerHolder::UrlCheckerHolder(
    GetDelegateCallback delegate_getter,
    int frame_tree_node_id,
    std::optional<int64_t> navigation_id,
    base::RepeatingCallback<content::WebContents*()> web_contents_getter,
    OnCompleteCheckCallback complete_callback,
    bool url_real_time_lookup_enabled,
    bool can_check_db,
    bool can_check_high_confidence_allowlist,
    std::string url_lookup_service_metric_suffix,
    base::WeakPtr<RealTimeUrlLookupServiceBase> url_lookup_service,
    base::WeakPtr<HashRealTimeService> hash_realtime_service,
    hash_realtime_utils::HashRealTimeSelection hash_realtime_selection,
    bool is_async_check,
    SessionID tab_id)
    :{}

UrlCheckerHolder::~UrlCheckerHolder() {}

void UrlCheckerHolder::Start(const StartParams& params) {}

void UrlCheckerHolder::CheckUrl(const GURL& url, const std::string& method) {}

void UrlCheckerHolder::SwapCompleteCallback(OnCompleteCheckCallback callback) {}

const std::vector<GURL>& UrlCheckerHolder::GetRedirectChain() {}

void UrlCheckerHolder::SetUrlCheckerForTesting(
    std::unique_ptr<SafeBrowsingUrlCheckerImpl> checker) {}

bool UrlCheckerHolder::IsRealTimeCheckForTesting() {}

bool UrlCheckerHolder::IsAsyncCheckForTesting() {}

void UrlCheckerHolder::AddUrlInRedirectChainForTesting(const GURL& url) {}

void UrlCheckerHolder::OnCheckUrlResult(
    bool proceed,
    bool showed_interstitial,
    bool has_post_commit_interstitial_skipped,
    SafeBrowsingUrlCheckerImpl::PerformedCheck performed_check) {}

}  // namespace safe_browsing