#include "chrome/browser/download/download_ui_safe_browsing_util.h"
#include "base/metrics/histogram_functions.h"
#include "base/strings/stringprintf.h"
#include "chrome/browser/profiles/profile.h"
#include "components/download/public/common/download_item.h"
#include "components/prefs/pref_service.h"
#include "components/safe_browsing/content/common/file_type_policies.h"
#include "components/safe_browsing/core/common/features.h"
#include "components/safe_browsing/core/common/safe_browsing_prefs.h"
#if BUILDFLAG(FULL_SAFE_BROWSING)
#include "chrome/browser/browser_process.h"
#include "chrome/browser/safe_browsing/download_protection/download_protection_service.h"
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#endif
namespace {
#if BUILDFLAG(FULL_SAFE_BROWSING)
ClientDownloadResponse;
ClientSafeBrowsingReportRequest;
#endif
std::string GetDangerPromptHistogramName(const std::string& suffix,
const download::DownloadItem& item) { … }
}
bool WasSafeBrowsingVerdictObtained(const download::DownloadItem* item) { … }
bool ShouldShowWarningForNoSafeBrowsing(Profile* profile) { … }
bool CanUserTurnOnSafeBrowsing(Profile* profile) { … }
void RecordDownloadDangerPromptHistogram(
const std::string& proceed_or_shown_suffix,
const download::DownloadItem& item) { … }
#if BUILDFLAG(FULL_SAFE_BROWSING)
void SendSafeBrowsingDownloadReport(
ClientSafeBrowsingReportRequest::ReportType report_type,
bool did_proceed,
download::DownloadItem* item) { … }
#endif
bool ShouldShowDeepScanPromptNotice(Profile* profile,
download::DownloadDangerType danger_type) { … }