#include "chrome/browser/enterprise/remote_commands/clear_browsing_data_job.h"
#include <optional>
#include "base/functional/bind.h"
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
#include "base/task/single_thread_task_runner.h"
#include "base/values.h"
#include "chrome/browser/profiles/profile.h"
namespace enterprise_commands {
namespace {
const char kFailedTypesPath[] = …;
const char kClearCacheField[] = …;
const char kClearCookiesField[] = …;
enum class DataTypes { … };
std::string CreatePayload(uint64_t failed_data_types) { … }
}
ClearBrowsingDataJob::ClearBrowsingDataJob(ProfileManager* profile_manager)
: … { … }
ClearBrowsingDataJob::ClearBrowsingDataJob(Profile* profile)
: … { … }
ClearBrowsingDataJob::~ClearBrowsingDataJob() = default;
enterprise_management::RemoteCommand_Type ClearBrowsingDataJob::GetType()
const { … }
bool ClearBrowsingDataJob::ParseCommandPayload(
const std::string& command_payload) { … }
void ClearBrowsingDataJob::RunImpl(CallbackWithResult result_callback) { … }
void ClearBrowsingDataJob::OnBrowsingDataRemoverDone(
uint64_t failed_data_types) { … }
}