#include "chrome/browser/profiles/nuke_profile_directory_utils.h"
#include <map>
#include "base/check_op.h"
#include "base/containers/contains.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/json/values_util.h"
#include "base/metrics/histogram_functions.h"
#include "base/no_destructor.h"
#include "base/task/thread_pool.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile_attributes_entry.h"
#include "chrome/browser/profiles/profile_attributes_storage.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/profiles/profile_metrics.h"
#include "chrome/common/chrome_paths_internal.h"
#include "chrome/common/pref_names.h"
#include "components/prefs/scoped_user_pref_update.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
namespace {
enum class NukeProfileResult { … };
const size_t kNukeProfileMaxRetryCount = …;
enum class ProfileDeletionStage { … };
ProfileDeletionMap;
ProfileDeletionMap& ProfilesToDelete() { … }
NukeProfileResult GetNukeProfileResult(size_t retry_count, bool success) { … }
void NukeProfileFromDiskImpl(const base::FilePath& profile_path,
size_t retry_count,
size_t max_retry_count,
base::OnceClosure done_callback) { … }
}
void NukeDeletedProfilesFromDisk() { … }
void NukeProfileFromDisk(const base::FilePath& profile_path,
base::OnceClosure done_callback) { … }
bool IsProfileDirectoryMarkedForDeletion(const base::FilePath& profile_path) { … }
void CancelProfileDeletion(const base::FilePath& path) { … }
bool ScheduleProfileDirectoryForDeletion(const base::FilePath& path) { … }
void MarkProfileDirectoryForDeletion(const base::FilePath& path) { … }