chromium/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_installation_manager.h

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_WEB_APPLICATIONS_ISOLATED_WEB_APPS_ISOLATED_WEB_APP_INSTALLATION_MANAGER_H_
#define CHROME_BROWSER_WEB_APPLICATIONS_ISOLATED_WEB_APPS_ISOLATED_WEB_APP_INSTALLATION_MANAGER_H_

#include <memory>
#include <optional>
#include <string>

#include "base/functional/callback_forward.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/weak_ptr.h"
#include "base/one_shot_event.h"
#include "base/types/expected.h"
#include "chrome/browser/web_applications/isolated_web_apps/isolated_web_app_install_source.h"
#include "chrome/browser/web_applications/web_app_command_scheduler.h"

namespace base {
class CommandLine;
enum class TaskPriority : uint8_t;
}  // namespace base

class Profile;

namespace web_app {

class IsolatedWebAppUrlInfo;
class WebAppProvider;

// This class manages Installation related operations for Isolated Web App.
//
// The `InstallFromCommandLine` method can be used to imperatively parse the
// provided command line and install an IWA if specified.
//
// on `Start()`, `MaybeScheduleGarbageCollection()` will check pref values to
// determine whether to schedule a `GarbageCollectStoragePartitionCommand`.
//
// On ChromeOS only, the command line will be parsed whenever a new manager is
// started, which occurs on `Profile` initialization. This is done this way
// because the browser does not go through the "normal" startup flow on
// ChromeOS, and has different startup behaviors depending on whether or not Ash
// or Lacros is used.
//
// TODO(cmfcmf): Revisit this behavior once using Ash instead of Lacros is no
// longer possible.
class IsolatedWebAppInstallationManager {};

}  // namespace web_app

#endif  // CHROME_BROWSER_WEB_APPLICATIONS_ISOLATED_WEB_APPS_ISOLATED_WEB_APP_INSTALLATION_MANAGER_H_