#include "components/webapps/browser/installable/ml_install_result_reporter.h"
#include <optional>
#include "base/memory/weak_ptr.h"
#include "base/metrics/field_trial_params.h"
#include "base/metrics/histogram_base.h"
#include "base/metrics/histogram_functions.h"
#include "base/rand_util.h"
#include "components/segmentation_platform/public/segmentation_platform_service.h"
#include "components/segmentation_platform/public/trigger.h"
#include "components/webapps/browser/banners/app_banner_manager.h"
#include "components/webapps/browser/features.h"
#include "components/webapps/browser/installable/installable_metrics.h"
#include "components/webapps/browser/installable/ml_install_operation_tracker.h"
#include "components/webapps/browser/installable/ml_installability_promoter.h"
#include "components/webapps/browser/webapps_client.h"
namespace webapps {
MlInstallResultReporter::MlInstallResultReporter(
base::WeakPtr<content::BrowserContext> browser_context,
segmentation_platform::TrainingRequestId training_request,
std::string ml_output_label,
const GURL& manifest_id,
bool ml_promotion_blocked_by_guardrail)
: … { … }
MlInstallResultReporter::~MlInstallResultReporter() { … }
void MlInstallResultReporter::OnInstallTrackerAttached(
WebappInstallSource install_source) { … }
const std::string& MlInstallResultReporter::output_label() const { … }
bool MlInstallResultReporter::ml_promotion_blocked_by_guardrail() const { … }
void MlInstallResultReporter::ReportResult(
WebappInstallSource source,
MlInstallUserResponse user_response) { … }
void MlInstallResultReporter::ReportResultInternal(
std::optional<WebappInstallSource> source,
MlInstallResponse response) { … }
}