#include "chrome/browser/enterprise/connectors/analysis/content_analysis_downloads_delegate.h"
#include "chrome/browser/enterprise/connectors/analysis/content_analysis_features.h"
#include "chrome/browser/enterprise/connectors/common.h"
#include "chrome/browser/enterprise/connectors/connectors_service.h"
#include "chrome/browser/safe_browsing/cloud_content_scanning/deep_scanning_utils.h"
#include "chrome/grit/generated_resources.h"
#include "components/enterprise/common/proto/connectors.pb.h"
#include "ui/base/l10n/l10n_util.h"
namespace enterprise_connectors {
ContentAnalysisDownloadsDelegate::ContentAnalysisDownloadsDelegate(
const std::u16string& filename,
const std::u16string& custom_message,
GURL custom_learn_more_url,
bool bypass_justification_required,
base::OnceCallback<void()> open_file_callback,
base::OnceCallback<void()> discard_file_callback,
download::DownloadItem* download_item,
const ContentAnalysisResponse::Result::TriggeredRule::CustomRuleMessage&
custom_rule_message)
: … { … }
ContentAnalysisDownloadsDelegate::~ContentAnalysisDownloadsDelegate() { … }
void ContentAnalysisDownloadsDelegate::BypassWarnings(
std::optional<std::u16string> user_justification) { … }
void ContentAnalysisDownloadsDelegate::Cancel(bool warning) { … }
void ContentAnalysisDownloadsDelegate::ResetCallbacks() { … }
std::optional<std::u16string>
ContentAnalysisDownloadsDelegate::GetCustomMessage() const { … }
std::optional<GURL> ContentAnalysisDownloadsDelegate::GetCustomLearnMoreUrl()
const { … }
std::optional<std::vector<std::pair<gfx::Range, GURL>>>
ContentAnalysisDownloadsDelegate::GetCustomRuleMessageRanges() const { … }
bool ContentAnalysisDownloadsDelegate::BypassRequiresJustification() const { … }
std::u16string ContentAnalysisDownloadsDelegate::GetBypassJustificationLabel()
const { … }
std::optional<std::u16string>
ContentAnalysisDownloadsDelegate::OverrideCancelButtonText() const { … }
void ContentAnalysisDownloadsDelegate::OnDownloadDestroyed(
download::DownloadItem* download) { … }
}