#include "chrome/browser/web_applications/commands/compute_app_size_command.h"
#include <memory>
#include <utility>
#include "base/barrier_callback.h"
#include "base/debug/crash_logging.h"
#include "base/files/file_util.h"
#include "base/functional/callback.h"
#include "base/functional/callback_forward.h"
#include "base/memory/ptr_util.h"
#include "base/memory/weak_ptr.h"
#include "chrome/browser/web_applications/commands/web_app_command.h"
#include "chrome/browser/web_applications/locks/app_lock.h"
#include "chrome/browser/web_applications/os_integration/os_integration_manager.h"
#include "chrome/browser/web_applications/web_app_constants.h"
#include "chrome/browser/web_applications/web_app_icon_generator.h"
#include "chrome/browser/web_applications/web_app_icon_manager.h"
#include "chrome/browser/web_applications/web_app_registrar.h"
#include "chrome/browser/web_applications/web_app_sync_bridge.h"
#include "chrome/browser/web_applications/web_app_utils.h"
#include "components/services/app_service/public/cpp/app_types.h"
#include "components/webapps/common/web_app_id.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/dom_storage_context.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/browser/storage_partition_config.h"
#include "content/public/browser/storage_usage_info.h"
namespace web_app {
ComputeAppSizeCommand::ComputeAppSizeCommand(
const webapps::AppId& app_id,
Profile* profile,
base::OnceCallback<void(std::optional<ComputedAppSize>)> callback)
: … { … }
ComputeAppSizeCommand::~ComputeAppSizeCommand() = default;
void ComputeAppSizeCommand::StartWithLock(std::unique_ptr<AppLock> lock) { … }
void ComputeAppSizeCommand::OnGetIconSize(uint64_t icon_size) { … }
void ComputeAppSizeCommand::GetDataSize() { … }
void ComputeAppSizeCommand::OnQuotaModelInfoLoaded(
const SiteDataSizeCollector::QuotaStorageUsageInfoList&
quota_storage_info_list) { … }
void ComputeAppSizeCommand::OnLocalStorageModelInfoLoaded(
const std::vector<content::StorageUsageInfo>& local_storage_info_list) { … }
void ComputeAppSizeCommand::ReportResultAndDestroy(CommandResult result) { … }
}