#include "chrome/updater/remove_uninstalled_apps_task.h"
#include <optional>
#include <string>
#include <vector>
#include "base/barrier_closure.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/logging.h"
#include "base/memory/scoped_refptr.h"
#include "base/sequence_checker.h"
#include "base/strings/string_util.h"
#include "base/task/thread_pool.h"
#include "base/version.h"
#include "chrome/updater/configurator.h"
#include "chrome/updater/constants.h"
#include "chrome/updater/persisted_data.h"
#include "chrome/updater/prefs.h"
#include "chrome/updater/update_service_impl.h"
#include "chrome/updater/util/util.h"
#include "components/prefs/pref_service.h"
#include "components/update_client/protocol_definition.h"
#include "components/update_client/update_client.h"
namespace updater {
namespace {
struct AppInfo { … };
struct PingInfo { … };
std::vector<AppInfo> GetRegisteredApps(
scoped_refptr<updater::PersistedData> persisted_data) { … }
std::vector<PingInfo> GetAppIDsToRemove(
const std::vector<AppInfo>& apps,
base::RepeatingCallback<std::optional<int>(const std::string&,
const base::FilePath&)>
predicate) { … }
void UninstallPingSent(base::RepeatingClosure callback,
update_client::Error error) { … }
void RemoveAppIDsAndSendUninstallPings(
base::OnceClosure callback,
scoped_refptr<PersistedData> persisted_data,
scoped_refptr<update_client::UpdateClient> update_client,
const std::vector<PingInfo>& app_ids_to_remove) { … }
}
RemoveUninstalledAppsTask::RemoveUninstalledAppsTask(
scoped_refptr<Configurator> config,
UpdaterScope scope)
: … { … }
RemoveUninstalledAppsTask::~RemoveUninstalledAppsTask() = default;
void RemoveUninstalledAppsTask::Run(base::OnceClosure callback) { … }
}