chromium/components/webapps/browser/installable/ml_install_result_reporter.h

// 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.

#ifndef COMPONENTS_WEBAPPS_BROWSER_INSTALLABLE_ML_INSTALL_RESULT_REPORTER_H_
#define COMPONENTS_WEBAPPS_BROWSER_INSTALLABLE_ML_INSTALL_RESULT_REPORTER_H_

#include <optional>

#include "base/memory/weak_ptr.h"
#include "components/segmentation_platform/public/trigger.h"
#include "components/webapps/browser/installable/installable_metrics.h"
#include "url/gurl.h"

namespace content {
class BrowserContext;
}

namespace webapps {
enum class MlInstallUserResponse;

// This class is responsible for reporting the result of the Ml installation
// classification prediction and updating any guardrail metrics if applicable.
//
// This class is expected to be destroyed when a navigation occurs, or anything
// else that would invalidate a given WebContents from being installable.
//
// On destruction, if no result was reported, the result "ignored" is sent to
// classification (or, if the guardrail was applied, "blocked by guardrails").
//
// The reason the 'guardrail' result is only reported when this class is
// destroyed is that this allows any user-initiated installation to still
// possibly occur & report a real result to classification.
class MlInstallResultReporter {};

}  // namespace webapps
#endif  // COMPONENTS_WEBAPPS_BROWSER_INSTALLABLE_ML_INSTALL_RESULT_REPORTER_H_