#include "chrome/browser/ui/views/web_apps/isolated_web_apps/installability_checker.h"
#include <memory>
#include <optional>
#include <string>
#include "base/functional/callback.h"
#include "base/memory/ptr_util.h"
#include "base/types/expected.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/web_applications/isolated_web_apps/check_isolated_web_app_bundle_installability_command.h"
#include "chrome/browser/web_applications/isolated_web_apps/isolated_web_app_source.h"
#include "chrome/browser/web_applications/isolated_web_apps/isolated_web_app_url_info.h"
#include "chrome/browser/web_applications/isolated_web_apps/signed_web_bundle_metadata.h"
#include "chrome/browser/web_applications/web_app_command_scheduler.h"
#include "chrome/browser/web_applications/web_app_provider.h"
namespace web_app {
std::unique_ptr<InstallabilityChecker> InstallabilityChecker::CreateAndStart(
Profile* profile,
WebAppProvider* web_app_provider,
IwaSourceBundleWithMode source,
base::OnceCallback<void(Result)> callback) { … }
InstallabilityChecker::~InstallabilityChecker() = default;
InstallabilityChecker::InstallabilityChecker(
Profile* profile,
WebAppProvider* web_app_provider,
base::OnceCallback<void(Result)> callback)
: … { … }
void InstallabilityChecker::Start(IwaSourceBundleWithMode source) { … }
void InstallabilityChecker::OnLoadedUrlInfo(
IwaSourceBundleWithMode source,
base::expected<IsolatedWebAppUrlInfo, std::string> url_info) { … }
void InstallabilityChecker::OnLoadedMetadata(
base::expected<SignedWebBundleMetadata, std::string> metadata) { … }
void InstallabilityChecker::OnInstallabilityChecked(
SignedWebBundleMetadata metadata,
IsolatedInstallabilityCheckResult installability_check_result,
std::optional<base::Version> installed_version) { … }
}