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

// Copyright 2024 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_CLEANUP_ORPHANED_ISOLATED_WEB_APPS_COMMAND_H_
#define CHROME_BROWSER_WEB_APPLICATIONS_ISOLATED_WEB_APPS_CLEANUP_ORPHANED_ISOLATED_WEB_APPS_COMMAND_H_

#include <memory>
#include <set>

#include "base/memory/weak_ptr.h"
#include "base/types/expected.h"
#include "chrome/browser/web_applications/commands/web_app_command.h"
#include "chrome/browser/web_applications/locks/all_apps_lock.h"

class Profile;

namespace base {
class FilePath;
}

namespace web_app {

struct CleanupOrphanedIsolatedWebAppsCommandSuccess {};

std::ostream& operator<<(
    std::ostream& os,
    const CleanupOrphanedIsolatedWebAppsCommandSuccess& success);

struct CleanupOrphanedIsolatedWebAppsCommandError {};

std::ostream& operator<<(
    std::ostream& os,
    const CleanupOrphanedIsolatedWebAppsCommandError& error);

class CleanupOrphanedIsolatedWebAppsCommand
    : public WebAppCommand<
          AllAppsLock,
          base::expected<CleanupOrphanedIsolatedWebAppsCommandSuccess,
                         CleanupOrphanedIsolatedWebAppsCommandError>> {};

}  // namespace web_app

#endif  // CHROME_BROWSER_WEB_APPLICATIONS_ISOLATED_WEB_APPS_CLEANUP_ORPHANED_ISOLATED_WEB_APPS_COMMAND_H_