#include "chrome/browser/web_applications/commands/install_from_info_command.h"
#include <memory>
#include <utility>
#include "base/functional/bind.h"
#include "base/memory/weak_ptr.h"
#include "chrome/browser/web_applications/jobs/install_from_info_job.h"
#include "chrome/browser/web_applications/jobs/uninstall/web_app_uninstall_and_replace_job.h"
#include "chrome/browser/web_applications/locks/app_lock.h"
#include "chrome/browser/web_applications/web_app.h"
#include "chrome/browser/web_applications/web_app_helpers.h"
#include "chrome/browser/web_applications/web_app_install_finalizer.h"
#include "chrome/browser/web_applications/web_app_install_utils.h"
#include "components/webapps/browser/install_result_code.h"
#include "components/webapps/browser/installable/installable_metrics.h"
#include "components/webapps/common/web_app_id.h"
namespace web_app {
namespace {
webapps::AppId GetAppId(const WebAppInstallInfo& install_info) { … }
}
InstallFromInfoCommand::InstallFromInfoCommand(
Profile* profile,
std::unique_ptr<WebAppInstallInfo> install_info,
bool overwrite_existing_manifest_fields,
webapps::WebappInstallSource install_surface,
OnceInstallCallback install_callback,
std::optional<WebAppInstallParams> install_params)
: … { … }
InstallFromInfoCommand::~InstallFromInfoCommand() = default;
void InstallFromInfoCommand::OnShutdown(
base::PassKey<WebAppCommandManager>) const { … }
void InstallFromInfoCommand::StartWithLock(std::unique_ptr<AppLock> lock) { … }
void InstallFromInfoCommand::OnInstallFromInfoJobCompleted(
webapps::AppId app_id,
webapps::InstallResultCode code) { … }
}