#ifndef CHROME_BROWSER_WEB_APPLICATIONS_ISOLATED_WEB_APPS_ISOLATED_WEB_APP_INSTALL_COMMAND_HELPER_H_
#define CHROME_BROWSER_WEB_APPLICATIONS_ISOLATED_WEB_APPS_ISOLATED_WEB_APP_INSTALL_COMMAND_HELPER_H_
#include <functional>
#include <memory>
#include <optional>
#include <string>
#include <vector>
#include "base/files/file_path.h"
#include "base/functional/callback_forward.h"
#include "base/memory/weak_ptr.h"
#include "base/types/expected.h"
#include "base/types/optional_ref.h"
#include "base/version.h"
#include "chrome/browser/web_applications/isolated_web_apps/isolated_web_app_url_info.h"
#include "chrome/browser/web_applications/web_app_install_info.h"
#include "chrome/browser/web_applications/web_app_install_utils.h"
#include "components/web_package/signed_web_bundles/signed_web_bundle_id.h"
#include "components/web_package/signed_web_bundles/signed_web_bundle_integrity_block.h"
#include "components/webapps/browser/installable/installable_logging.h"
#include "third_party/blink/public/mojom/manifest/manifest.mojom-forward.h"
#include "url/gurl.h"
class Profile;
namespace content {
class WebContents;
}
namespace webapps {
class WebAppUrlLoader;
enum class WebAppUrlLoaderResult;
}
namespace web_app {
enum class IconsDownloadedResult;
class IsolatedWebAppResponseReader;
class IsolatedWebAppStorageLocation;
class IsolatedWebAppResponseReaderFactory;
class IwaSourceWithMode;
class IwaSourceWithModeAndFileOp;
class UnusableSwbnFileError;
class WebAppDataRetriever;
class WebAppRegistrar;
void UpdateBundlePathAndCreateStorageLocation(
const base::FilePath& profile_dir,
const IwaSourceWithModeAndFileOp& source,
base::OnceCallback<void(
base::expected<IsolatedWebAppStorageLocation, std::string>)> callback);
void CleanupLocationIfOwned(const base::FilePath& profile_dir,
const IsolatedWebAppStorageLocation& location,
base::OnceClosure closure);
base::expected<std::reference_wrapper<const WebApp>, std::string>
GetIsolatedWebAppById(const WebAppRegistrar& registrar,
const webapps::AppId& iwa_id);
base::flat_map<web_package::SignedWebBundleId,
std::reference_wrapper<const WebApp>>
GetInstalledIwas(const WebAppRegistrar& registrar);
enum class KeyRotationLookupResult { … };
KeyRotationLookupResult LookupRotatedKey(
const web_package::SignedWebBundleId& web_bundle_id,
base::optional_ref<base::Value::Dict> debug_log = std::nullopt);
struct KeyRotationData { … };
KeyRotationData GetKeyRotationData(
const web_package::SignedWebBundleId& web_bundle_id,
const WebApp::IsolationData& isolation_data);
class IsolatedWebAppInstallCommandHelper { … };
}
#endif