#include "components/enterprise/browser/reporting/real_time_report_controller.h"
#include "base/containers/flat_map.h"
#include "components/enterprise/browser/reporting/real_time_report_generator.h"
#include "components/enterprise/browser/reporting/real_time_report_type.h"
#include "components/enterprise/browser/reporting/real_time_uploader.h"
#include "components/enterprise/browser/reporting/reporting_delegate_factory.h"
#include "components/policy/core/common/cloud/dm_token.h"
namespace enterprise_reporting {
namespace {
void OnReportEnqueued(RealTimeReportType type, bool success) { … }
}
RealTimeReportController::RealTimeReportController(
ReportingDelegateFactory* delegate_factory)
: … { … }
RealTimeReportController::~RealTimeReportController() = default;
RealTimeReportController::Delegate::Delegate() = default;
RealTimeReportController::Delegate::~Delegate() = default;
void RealTimeReportController::Delegate::SetTriggerCallback(
RealTimeReportController::TriggerCallback callback) { … }
void RealTimeReportController::OnDMTokenUpdated(policy::DMToken&& dm_token) { … }
void RealTimeReportController::GenerateAndUploadReport(
RealTimeReportType type,
const RealTimeReportGenerator::Data& data) { … }
void RealTimeReportController::UploadReport(
const RealTimeReportGenerator::Data& data,
const ReportConfig& config) { … }
void RealTimeReportController::SetUploaderForTesting(
RealTimeReportType type,
std::unique_ptr<RealTimeUploader> uploader) { … }
void RealTimeReportController::SetReportGeneratorForTesting(
std::unique_ptr<RealTimeReportGenerator> generator) { … }
RealTimeReportController::Delegate*
RealTimeReportController::GetDelegateForTesting() { … }
}