#ifndef CHROME_BROWSER_WEB_APPLICATIONS_PREINSTALLED_WEB_APP_UTILS_H_
#define CHROME_BROWSER_WEB_APPLICATIONS_PREINSTALLED_WEB_APP_UTILS_H_
#include <string>
#include <string_view>
#include "base/types/expected.h"
#include "chrome/browser/web_applications/external_install_options.h"
#include "third_party/abseil-cpp/absl/types/variant.h"
namespace base {
class FilePath;
class Value;
}
class Profile;
namespace web_app {
class FileUtilsWrapper;
OptionsOrError;
OptionsOrError ParseConfig(FileUtilsWrapper& file_utils,
const base::FilePath& dir,
const base::FilePath& file,
const base::Value& app_config);
IconBitmapsOrError;
IconBitmapsOrError ParseOfflineManifestIconBitmaps(
FileUtilsWrapper& file_utils,
const base::FilePath& dir,
const base::FilePath& manifest_file,
const char* icon_key,
const base::Value* icon_files);
WebAppInstallInfoFactoryOrError;
WebAppInstallInfoFactoryOrError ParseOfflineManifest(
FileUtilsWrapper& file_utils,
const base::FilePath& dir,
const base::FilePath& file,
const base::Value& offline_manifest);
bool IsReinstallPastMilestoneNeeded(
std::string_view last_preinstall_synchronize_milestone_str,
std::string_view current_milestone_str,
int force_reinstall_for_milestone);
bool WasAppMigratedToWebApp(Profile* profile, const std::string& app_id);
void MarkAppAsMigratedToWebApp(Profile* profile,
const std::string& app_id,
bool was_migrated);
bool WasPreinstalledAppUninstalled(Profile* profile, const std::string& app_id);
void MarkPreinstalledAppAsUninstalled(Profile* profile,
const std::string& app_id);
bool WasMigrationRun(Profile* profile, std::string_view feature_name);
void SetMigrationRun(Profile* profile,
std::string_view feature_name,
bool was_migrated);
std::optional<bool> DeviceHasStylusEnabledTouchscreen();
}
#endif