chromium/components/safe_browsing/core/common/hashprefix_realtime/hash_realtime_utils.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/core/common/hashprefix_realtime/hash_realtime_utils.h"

#include "base/check.h"
#include "base/containers/contains.h"
#include "base/metrics/histogram_functions.h"
#include "base/strings/strcat.h"
#include "build/branding_buildflags.h"
#include "components/prefs/pref_service.h"
#include "components/safe_browsing/core/common/features.h"
#include "components/safe_browsing/core/common/safe_browsing_prefs.h"
#include "components/safe_browsing/core/common/utils.h"
#include "components/variations/pref_names.h"
#include "components/variations/service/variations_service.h"

namespace safe_browsing::hash_realtime_utils {
// Used by tests so that more than just GOOGLE_CHROME_BRANDING bots are capable
// of running these tests.
bool kPretendHasGoogleChromeBranding =;

namespace {
bool HasGoogleChromeBranding() {}
}  // namespace

bool CanCheckUrl(const GURL& url) {}

bool IsHashDetailRelevant(const V5::FullHash::FullHashDetail& detail) {}
std::string GetHashPrefix(const std::string& full_hash) {}
bool IsHashRealTimeLookupEligibleInSession() {}
bool IsHashRealTimeLookupEligibleInLocation(
    std::optional<std::string> latest_country) {}
bool IsHashRealTimeLookupEligibleInSessionAndLocation(
    std::optional<std::string> latest_country) {}
std::optional<std::string> GetCountryCode(
    variations::VariationsService* variations_service) {}
HashRealTimeSelection DetermineHashRealTimeSelection(
    bool is_off_the_record,
    PrefService* prefs,
    std::optional<std::string> latest_country,
    bool log_usage_histograms) {}

HashRealTimeSelectionConfiguringPrefs
GetHashRealTimeSelectionConfiguringPrefs() {}

GoogleChromeBrandingPretenderForTesting::
    GoogleChromeBrandingPretenderForTesting() {}
GoogleChromeBrandingPretenderForTesting::
    ~GoogleChromeBrandingPretenderForTesting() {}
void GoogleChromeBrandingPretenderForTesting::StopApplyingBranding() {}

HashRealTimeSelectionConfiguringPrefs::HashRealTimeSelectionConfiguringPrefs(
    std::vector<const char*>& profile_prefs,
    std::vector<const char*>& local_state_prefs)
    :{}

HashRealTimeSelectionConfiguringPrefs::
    ~HashRealTimeSelectionConfiguringPrefs() = default;

}  // namespace safe_browsing::hash_realtime_utils